• Resolved reeju619

    (@reeju619)


     <?php  
    $args=array('public'   => true, '_builtin' => false); 
    $output = 'names';
    $operator = 'and';
    $taxonomies=get_taxonomies($args,$output,$operator); 
    if  ($taxonomies) {
        foreach ($taxonomies  as $taxonomy ) {
           
            $terms = get_terms($taxonomy);
            $count = count($terms);
            if ( $count > 0 ){
               
                foreach ( $terms as $term ) {
                    $termlinks= get_term_link($term,$taxonomy);
    				
                    ?>  <div class="pro_block">
                  <a href="<?php echo $termlinks; ?>">
                   <img src="<?php bloginfo('template_url'); ?>/images/ideal-exotica-videopic.jpg" alt="">
                    <span class="pro_name"><?php echo $term->name; ?></span>
                  </a>
                </div>
                   <?php
                }
           
            }
        }
    }
    ?>  

    This is my code. In this how can I show the taxonomy image. Please help me with it.
    I have managed it display the taxonomy name.

    • This topic was modified 2 years, 2 months ago by reeju619.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to display taxonomy images in the frontend ?’ is closed to new replies.