Limit image rendering

1

I'm using the link plugin to link images to categories, and I'm printing icons next to the post title so (code below) but it brings all related categories and I wanted to limit to just one can someone help me ?:

<?php
        print apply_filters( 'taxonomy-images-list-the-terms', '', array(
            'attr'       => array(
            'alt'   => '',
            'class' => 'img-responsive',
            'src'   => '',
            'title' => '',
         ),
        'before'       => '<div class="">',
        'after'        => '</div>',
        'before_image' => '',
        'after_image'  => '',
        'image_size'   => 'detail',
        'post_id'      => get_the_ID()
) );


                ?>
    
asked by anonymous 29.04.2016 / 18:41

1 answer

0

I know that it has already been solved, but just to not leave unanswered if someone else also has the same problem, the solution is simple.

In line 2 of your code, you will replace the terms:

print apply_filters( 'taxonomy-images-list-the-terms',

By:

print apply_filters( 'taxonomy-images-queried-term-image'

In case the only difference is the arguments images-list-the-terms and images-queried-term-image .

@edit - To make it easier to change the entire code.

print apply_filters( 'taxonomy-images-queried-term-image', '', array(
'attr'       => array(
    'alt'   => '',
    'class' => 'img-responsive',
    'src'   => '',
    'title' => '',
    ),
'before'     => '<div class="">',
'after'      => '</div>',
'image_size' => 'detail',
'post_id'      => get_the_ID()
 );
    
29.04.2016 / 19:14