Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h3>Related Post : </h3> <ol type="1"> <?php $tags = wp_get_post_tags($post->ID);
- if ($tags) { $first_tag = $tags[0]->term_id;
- $args=array( 'tag__in' => array($first_tag), 'post__not_in' => array($post->ID), 'showposts'=><red>5</red>, 'caller_get_posts'=>1 );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li> <?php endwhile; }} ?></ol>
Advertisement
Add Comment
Please, Sign In to add comment