Home Forums General Issues New Fields Don't Work


New Fields Don't Work

  • I added a bunch of custom fields to Posts to display different product presentations. We created a Field Group with True/False subfields. Initially, we used only 8 presentations/sub-fields and created some conditional content, if the presentation was marked as True, then an icon would appear. Here an example of how the icons we made to appear, we added the following line of code for each of the 8 presentations:

    <?php $presentation = get_field('presentation_one'); if($presentation) { ?>
        <img class="presentation-icon" src="<?php bloginfo('template_directory');?>/img/presentation_one.svg">
    <?php } ?>

    We added 4 more presentations and the conditional didn’t work for them. It is as if the new fields aren’t detected by WordPress or PHP.

    Any ideas on how to solve it?

  • I guess we need more info than that. What are these true/false fields? Radio buttons? Button groups? What are the return values? Could there be typos in the code?

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

The topic ‘New Fields Don't Work’ is closed to new replies.