How to display taxonomy images in the frontend ?

 <?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 9 minutes ago by reeju619.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer