Support

Account

Home Forums General Issues How to display taxonomy checkbox links on WooCommerce product category archive Reply To: How to display taxonomy checkbox links on WooCommerce product category archive

  • Hi @cjf9

    You need to do the same for the tax field as with all your others and set the second parameter the same way.

    
    <?php 
    $queried_object = get_queried_object(); 
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;  
    $related_terms = get_field('quick_links', $taxonomy . '_' . $term_id);
    if( $related_terms ): ?>
    
    	<ul>
    
    	<?php foreach( $related_terms as $related_term ): ?>
    
    		<a href="<?php echo get_term_link( $related_term ); ?>"><?php echo $related_term->name; ?></a>
    
    	<?php endforeach; ?>
    
    	</ul>
    
    <?php endif; ?>