How to display post according number using query_posts() in WordPress.
The query_posts function is used to easily modify the content returned for the default WordPress Loop
If we want to display number of posts then thequery_posts() function should be placed directly above the start of the Loop:
Example:-
The following example are to display only six post in WordPress.
query_posts( 'posts_per_page=6'&paged='.$paged );
if( have_posts() ):
while( have_posts() ): the_post();
//loop content(template tags,html,etc)
echo '
<li>';
the_title();
echo '</li>
';
endwhile;
endif;
// Reset Query
wp_reset_query();
Total Page Visits: 3058 - Today Page Visits: 1