I'm hoping that someone can help me out here. I am trying to get ACF integrated into a Theme a client purchased.
The basic functionality is that I have built a custom field on every post to choose where to place the post. Thus, if they choose “Option A” in the post, then the code needs to check for that option to be true before passing all of the content related to the post (Title, Content, Images, etc.)
A basic code example of how this would work in a standard php document would be as follows:
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<?php if(get_field('pick_your_theme') == "Theme1") { ?>
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
<?php } ?><?php endwhile; ?>
<?php endif; ?>
The issue here is that the theme author has created the page in one giant open PHP function rather than breaking it up (as in example code 1 above) where I can easily insert the selector get_field.
Below is a link for the PHP code for the page: