Support

Account

Home Forums General Issues Output issue – can't find the cause

Solved

Output issue – can't find the cause

  • I’ve got a very strange issue with a site I’m working on. I have a field group with six fields. Fields 2-6 are working fine, in that there’s data in them, and the data is being output into my theme through the normal use of template tags.

    However, the first field is being output as part of the_content(), and I can’t figure out how or where this is being set up. I’m tearing my hair out.

    I’ve done the following:
    – searched through my entire child theme for stray template tags

    – searched the parent theme in case I accidentally put them there

    – combed the functions.php for both parent and child themes for filters etc. that would inject both a div with a custom class and the custom field

    – added a new function that puts a string of text before and after the_content(), which firmly established this one field is being output as part of the_content()

    – changed to an entirely new theme fresh from the repository – the custom field is still showing up in the_content()

    – disabled ACF – the field is still showing up

    I’m thoroughly stumped. As far as I can tell, there’s no good reason for this field to be visible on the site at all – there’s no code I can locate that would explain how it’s displaying. I must have done it on purpose at some point, because I wanted that field to appear inside the same div tag as the rest of the blog post, but I can’t figure out what I did.

    Can anyone point me at a new angle of approach? Thanks so much.

  • Usually, if content from an ACF field is showing in the the_content then it’s done with a shortcode, but if you disable ACF then it should show the shortcode code and not the field, unless there is a custom shortcode that is doing the work.

  • Thanks John – disabling ACF showed nothing, which then helped remind me that I’d coded a special plugin for this site, too, and lo and behold the custom function was in the plugin. I don’t normally use plugins, but this site is extra complex.

    Resolved, and may it possibly be helpful to someone else later.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Output issue – can't find the cause’ is closed to new replies.