Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <em><h3 class="postmetadata"><span class="tags">
- <?php the_tags( __( ' ', 'twentyten' ), ', ', ''); ?></h3></em>
- <div class="entry">
- <div id="list-posts">
- <?php
- global $post;
- query_posts ('cat=1 &posts_per_page=1'); ?>
- <div class="post" id="post-<?php the_ID(); ?>">
- <?php
- //for use in the loop, list 5 post titles related to first tag on current post
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- echo '';
- $first_tag = $tags[0]->term_id;
- $args=array(
- 'tag__in' => array($first_tag),
- 'showposts'=>20,
- 'caller_get_posts'=>1
- );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() )
- { ?>
- <ul style="list-style-type: square; padding-left:10px; margin-left: 10px;">
- <?php
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php the_title(); ?> </a></li>
- <?php endwhile; ?>
- </ul>
- <?php }}?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement