how to show single post in a custom template

hi i used the below code to list out the posts in a particular category.

<div class="wrapred">
                    <?php if ( have_posts() ) : 

                        ?>
                    <?php query_posts('category_name=services&showposts=5'); ?>
        <?php while ( have_posts() ) : the_post(); ?>


         <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

             <div class="popthumb"><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a><?php echo '&nbsp;&nbsp;'; the_title(); ?></h2>

 </div>

 <div class="popcontent">

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

                    </article>
        <?php endwhile; ?>
                <?php endif; ?>

Read More

it works fine. but now when i click on the excerpt read more link the post shows in a unordered template. i need to show them as like the subpages are showing. i have a subpage template file. how can i use that file for displaying single posts??

Related posts

1 comment

  1. In most templates, the file single.php is used to display a single post. So you can use the code from the subpage template file in single.php to style a single post.

Comments are closed.