View Single Post
  #8  
Old 06-22-2009, 06:03 AM
CharlesClarkson's Avatar
CharlesClarkson CharlesClarkson is offline
Community Moderator
 
Join Date: Feb 2009
Location: Stephenville, TX, USA
Posts: 11,356
Default Re: Full post blog functionality on the front page

Quote:
Originally Posted by StephanieV
nah, doing what you suggested removes all the other categories but the same 10 posts from the desired category repeat on each page.
Sorry. That's my fault. When I used query_posts() I forgot about paging. We have to retrieve the page number from the previous query first.
Code:
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=1&showposts=5&paged=$page"); ?>
Where 1 is your category and 5 is the number of posts per page. $page contains the page number of the current page. showposts should match the Genreal->Reading->"Blog pages show at most" setting.


HTH,
__________________
Charles "Rubeus Hagrid" Clarkson
StudioPress on Facebook

I'm not really a smart person. I just play one on the Internet.

Please use the HTML or PHP tags for pasting code.
Please make your links click-able: this_is_annoying.com
http://this_is_not_annoying.com.