• danaherlihey

    (@danaherlihey)


    Hi,

    I’m trying to include a summary of recent posts from a specific category to appear in a single post template.

    So far I have:

    <h1>Latest News</h1>
       <?php query_posts('category_name=news&showposts=4');
      						while (have_posts()) : the_post();
     						 ?>
    
    				<a class="title" href="<?php the_permalink() ?>" rel="bookmark" title="Read the feature article: <?php the_title(); ?>"><?php the_title(); ?></a>
    
    			<?php global $more; $more = false; ?>
    				<span class="readmore_g"><?php the_content('<br />Read More'); ?></span>
                    <?php $more = true; ?>
    
                  <?php endwhile; ?>

    This is followed by the loop for the regular single post. The problem is that it shows 4 full posts in the single view instead of one (obviously because of the showpost)

    any suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘summary of recent posts in single post template’ is closed to new replies.