Home › Forums › Add-ons › Options Page › Getting taxonomy from options page › Reply To: Getting taxonomy from options page
This gives me the term_link, but still the name is not shown:
<?php if( have_rows('bilder', 'option') ): ?>
<ul>
<?php while( have_rows('bilder', 'option') ): the_row();
// vars
$image = get_sub_field('bild');
$category = get_sub_field('kategorie');
?>
<?php
$terms = get_sub_field('kategorie');
if( $terms ): ?>
<?php foreach( $terms as $term ): ?>
<?php echo get_term_link( $term ); ?>
<?php echo $term->name; ?>
<?php endforeach; ?>
<?php endif; ?>
<li>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt'] ?>" />
</li>
<?php endwhile; ?>
</ul>
<?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!
🚀 ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
✨This release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 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.