• Resolved jitendraamishra

    (@mishrajitu)


    Hello Mate,

    After searching madly for this functionality, I have reached to your plugin. Now I can add featured images to tags. 50% of my job is over. Now I want to show the featured image of tags on the blog page where the tags are showing.

    The code for showing the tags in the Blog page is as follows:

    <div class="custom-category">
        <?php
          $post_tags_show_text = __('Tags', 'directory');
          $terms = wp_get_post_terms ( $cs_post_id, 'directory-tag', array('orderby' => 'date', 'order' => 'DESC') );
          if ( isset($terms) ){ ?>
            <div class="custom-tags"> <!-- cs Tages Start -->
              <h5><?php echo esc_attr($post_tags_show_text);?></h5>
              <ul>
              <?php
              foreach($terms as $term) {
                  echo "<li><a href='".get_term_link($term)."' title='".$term->name."'>".$term->name."</a></li>";
              }
              ?>
              </ul>
            </div>
        <?php } ?>
    </div>

    Please tell me how to edit this code to add the function so that the featured image of the tag will show there on the Blog page?

    https://www.ads-software.com/plugins/easy-taxonomy-images/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wpdevstudio

    (@wpdevstudio)

    Hi Jitendra,

    you can use taxonomy_featured_image($term->term_id) in your foreach loop to display featured image of the tag

    Thanks

    Thread Starter jitendraamishra

    (@mishrajitu)

    Hello mate,

    Thank you for your reply.

    I am not much adequate with codes. Is that code to be added somewhere inside the above mentioned code?

    Let me know so that I can do that.

    Plugin Author wpdevstudio

    (@wpdevstudio)

    Yes you need to add above mentioned code snippet in your foreach loop

    Plugin Author wpdevstudio

    (@wpdevstudio)

    Hope this fixed your issue

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Featured image for tag in the Blog Page’ is closed to new replies.