Trouble outputting content in frontend
-
I have a layout row inside of a flexible content block that looks like this:
if( have_rows('content_area') ): while ( have_rows('content_area') ) : the_row(); if( get_row_layout() == 'gravity_form' ): $form = get_sub_field('form'); foreach($forms as $form) { gravity_form($form, true, true, false, '', true, 1); } endif; endwhile; else : // do nothing endif;
When I pass an ID into the gravity_form function it outputs my form to the page.
However, I want to dynamically show the form that is selected from the admin panel and can’t quite figure out how to do this.
This is what my ACF set up looks like:
- The topic ‘Trouble outputting content in frontend’ is closed to new replies.