Support

Account

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; ?>