P
P
pokanub2021-01-29 15:15:44
Taxonomy
pokanub, 2021-01-29 15:15:44

How to display tag images in a post using the Taxonomy Images plugin in index.php?

Hello everyone, I need to display an image of a certain label in a post (using the Taxonomy Images plugin), how can I do this? Here is the code:

<div class="blog-list row">
                <?php
                    $args = array(
                        'post_type'      => 'post',
                        'posts_per_page' => 18,
                        'orderby'        => 'date',
                        'order'          => 'DESC',
                    );
                    $q = new WP_Query($args);
                    ?>

                    <?php if ( $q->have_posts() ) : ?>
                        <?php while ( $q->have_posts() ) : $q->the_post(); ?>
                            <div class="col-lg-6">
                                <article>
                                    <div class="post-thumbnail">
                                        <?php the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) ?>
                                    </div>
                                    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                                    <p><?php  the_tags(''); ?></p>
                                    <div><?php the_excerpt(); ?></div>
                                </article>
                            </div>
                        <?php endwhile; ?>
                    <?php endif; ?>

                    <?php wp_reset_postdata(); ?>
            </div>

rMWeu.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question