Home › Forums › Front-end Issues › Can't display dropdown choice › Reply To: Can't display dropdown choice
Hi @daisuke
Are you returning a single or multiple value?
As per the docs
If it’s a single value, use:
<p>Color: <?php the_field('color'); ?></p>
If it’s a multiple value, use:
<?php
$colors = get_field( 'color' );
// Create a comma-separated list from selected values.
if( $colors ): ?>
<p>Color: <?php echo implode( ', ', $colors ); ?></p>
<?php endif; ?>
Change color to the name of you ACF field, see if that works.
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 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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.