Home › Forums › ACF PRO › Echo Only Chosen Option › Reply To: Echo Only Chosen Option
Nevermind, I figured it out. 🙂
If anyone needs to show an ACF value if a specific option has been chosen, then here is the code for that. Feel free to use away!
You will need to change the field types with your own field names and options though!
`<!– artwork availability –>
<?php if(get_field(‘availability’) == “Sold”): ?>
<div class=”sold”><?php echo the_field(‘availability’); ?></div>
<?php endif; ?>
<!– ./artwork availability –>`
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!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.