Home Forums General Issues Display Field Group specific pages


Display Field Group specific pages

  • Hi all,

    I have made a fieldgroup which I would like to display only on specific pages, I also have another fieldgroup, which is the same variant but slightly different that I would like to show on the other pages.

    My field group includes header image & page title, based on if the page has fieldgroup first display the img and title from fieldgroup first. As for the other pages show fieldgroup second.

    I guess it would be something like this:

    if ( get_field_group('first') ): 
      // do something
      elseif( get_field_group('second') ):
        // do something
      <?php endif; ?>
    <?php endif; ?>
  • You can’t use get_field_group() here, it does not do what you expect if to do. There needs to be some other indication of what to show.

    What are the location rules for your field groups?

    How do you decide what field group is available for entry on these different pages?

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

You must be logged in to reply to this topic.