<?php $tags = wp_get_post_tags($post->ID); if ($tags) { echo '<h3>Kapcsolódó bejegyzések</h3>'; $first_tag = $tags[0]->term_id; $args=array( 'tag__in' => array($first_tag), 'post__not_in' => array($post->ID), 'posts_per_page'=>5, 'caller_get_posts'=>1 ); $my_query = new WP_Query($args); ?> <div class="row"> <?php if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <div class="col-md-4"> <div class="card"> <div class="item-hover circle effect13 top_to_bottom"> <a href="<?php the_permalink(); ?>"> <div class="card-body"> <h3 class="card-title"><?php the_title(); ?></h3> <p class="readmore"><i class="fas fa-angle-right"></i> <?php include('translate/tovabb.php'); ?></p> </div> <div class="info"> <div class="info-back home-posts"> <h3 class="label"><?php the_title(); ?></h3> <p class="readmore-postsback"><i class="fas fa-angle-right"></i><?php include('translate/tovabb.php'); ?></p> </div> </div> </a> </div> </div> </div> <?php endwhile; } ?> </div> <?php wp_reset_query(); } ?>