Support

Account

Home Forums General Issues How to filter taxonomy terms? Reply To: How to filter taxonomy terms?

  • Hi @ruriko,

    Thanks for the post.

    I am not sure I have clearly understood the use case, but if you want to list the Taxonomy terms, you can add the following snippet to your template:

    <?php 
    
    //Get and loop over multiple selected term objects
    
    $terms = get_field('taxonomy_field_name');
    
    if( $terms ): ?>
    
    	<ul>
    
    	<?php foreach( $terms as $term ): ?>
    
    		<h2><?php echo $term->name; ?></h2>
    		<p><?php echo $term->description; ?></p>
    		<a href="<?php echo get_term_link( $term ); ?>">View all '<?php echo $term->name; ?>' posts</a>
    
    	<?php endforeach; ?>
    
    	</ul>
    
    <?php endif; ?>