Home › Forums › Add-ons › Repeater Field › How to display radio button options? › Reply To: How to display radio button options?
Thanks John, I modified it a bit so this is what it looks like now (works perfectly!):
<?php if( have_rows('resources_column') ): ?>
<?php while( have_rows('resources_column') ): the_row();
// variables
$title = get_sub_field('resource_title');
$internal_link = get_sub_field('resource_internal_link');
$external_link = get_sub_field('resource_external_link');
$description = get_sub_field('resource_description');
$resource_link_type = get_sub_field('resource_link_type');
if ($resource_link_type == 'internal') {
$link = get_sub_field('resource_internal_link');
} else {
$target = ' target="_blank" rel="nofollow"';
$link = get_sub_field('resource_external_link');
}
?>
<p class="resource-title"><a href="<?php echo $link; ?>"<?php echo $target; ?>><?php echo $title; ?></a></p>
<p class="resource-description"><?php echo $description; ?></p>
<?php endwhile; ?>
<?php endif; ?>
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.