Hi,
I want to display only 4 post per page... the remaining should go to next pages... any help . how to solve this
Hi,
I want to display only 4 post per page... the remaining should go to next pages... any help . how to solve this
Go to Settings/Reading in your admin panel and enter "4" where it says "Blog pages show at most [x] posts".
Thanks for your reply.....
I used
query_posts('posts_per_page=4&category_name='.$category->cat_name);
It's displaying 4 post... I want to display the remaining posts in next pages... but clicking the next button, its should display the remaining post.... I used
<div class="morebg">
<div class="morebgcontainleft">
<?php posts_nav_link('','','« Previous Entries') ?>
</div>
<div class="morebgcontainright">
<?php posts_nav_link('','Next Entries »','') ?>
</div>
</div>
Its going to next category posts disply... pls help me to solve this..
try to expand your query line with the paged parameter:
query_posts('posts_per_page=4&category_name='.$category->cat_name);
so it looks like this:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('posts_per_page=4&category_name='.$category->cat_name . '&paged=' . $paged);
http://codex.wordpress.org/Function_Reference/query_posts#Pagination_Parameters
thank you.. it's working.
This topic has been closed to new replies.