If any fields you reference are INSIDE the flexibile content, you need to use the_sub_field() or get_sub_field() to see any content.
I think this would be one reason why (when I tried your method), only one column of content is posting and not both. I’m only getting the second column of data because of the way I’m requesting it. So in that case, I would nee to change this
<?php elseif( get_sub_field('columns') == "2") : ?> <div class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> </div> <div class="blue"> <div class="col-sm-6"> <?php the_sub_field('title'); ?> <?php the_sub_field('text_copy'); ?> </div> <?php endif;
get_sub_field('columns') == "1" && == "2") : ?>
Which doesn’t seem like a good idea to use. Based upon the way I’ve developed this:
There should be a more viable solution to post both columns without using ‘&&’.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!