wp page numbers linking to blank cat pages

virtualgeorge

Junior Member
Joined
Sep 20, 2008
Messages
181
Reaction score
162
My blog has 13 posts total so the page nav at the bottom of my latest posts section on the homepage should only show 2 page. However there are links 2 7 pages. Page 1 & 2 show my posts but 3 - 7 just link to blank category pages with no post on them.
http://lifeofcustoms.com/
Some page numbers at bottom go to pages like:
http://lifeofcustoms.com/page/6/ with no posts.

If you go to one of the categories the page numbers are working
fine.
http://lifeofcustoms.com/category/features/

Had someone help me setup this site & using wp page numbers on the homepage nav but not sure where to find the nav links on the cat pages?

I know home.php uses

<div class="navigation"><p><?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?></p></div>

For the nav numbers so maybe I need to replace that with what ever is on the category pages for the nav links to solve issue?

thanks for any tips!!
 
Last edited:
Replace <div class="navigation"><p><?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?></p></div> with this:
PHP:
<div class="navigation"><p><?php query_posts('showposts=8'); ?><?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?><?php wp_reset_query(); ?></p></div>
or leave the code as it is and add before that code this:
PHP:
<?php
$paged = intval(get_query_var('paged'));
if($paged == 0) {
$paged = 1;
}
?>
or add this first and the code that i give. If you can't do it PMB me with the login details and i will do it free.
 
Last edited:
Thanks man that worked, pm your paypal address :)
 
Back
Top