Home › Forums › Add-ons › Flexible Content Field › Post Based On Condition of Field › Reply To: Post Based On Condition of Field
That’s exactly the thought that I’m trying to do. But when I use your code, nothing posts. So I modified it a tad (first-step.PNG).
With this modification, it seems that the
<div class="entry-header">
<h1 class="entry-title"><?php the_sub_field('title'); ?></h1>
</div>
is repeating, which it should only post one time.
A screenshot of what it looks like in code view is attached (result.PNG). I’m thinking it’s posting twice because it’s within a loop. But if I move it: (second-step.PNG), the title won’t post.
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!
We’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.