Blog on Template Page


In WordPress some time we need to show the Blog on Different Page .We can do this by using the following code .
First we make template page called blog.php
After that we can put the following main code on the blog.php .I ignore the header footer and sidebar portion .

< ?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $total_post=get_option("posts_per_page"); query_posts("posts_per_page=$total_post&paged=".$paged); if (have_posts()) : while (have_posts()) : the_post(); the_excerpt(''); the_content(); endwhile; endif; wp_reset_query(); ?>
,

Leave a Reply