Support

Account

Home Forums Front-end Issues True/False Not Working after adding post Reply To: True/False Not Working after adding post

  • Hi @Yashi

    There is a logic error in your code. You are loading 5 posts, but then within the loop you are checking for the value of ‘featured_news’.

    If none of the 5 latest posts have this selected, then no HTML will be rendered.

    What you indented to do was to query the posts with the a ‘featured_news’ value of 1. You can do this by following the tutorial here:
    http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/

    To sum up, you want to query posts that have the custom field value, then remove the if statement completely

    Thanks
    E