Home Forums General Issues ACF Within Loop Reply To: ACF Within Loop

  • Sorry, there is nothing within the second code pasted because I’ve tried multiple times to add the

    <?php if(get_field('pick_your_theme') == "LCBU Trends") { ?>

    within the document and all it does is break the page layout as well as doesn’t filter correctly. The issue here is that how 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.

    I’ve attached an attachment of the PHP document I am trying to edit so you can have a clear understanding.

    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.)