Hi game_0ver. Can you check the link you posted? I got a 404 Not Found error. Thanks.
It was just an example. notice the ‘my domain’ the actual url is http://www.ultimatebuzz.net/news/
What happens if you disable the WP-PageNavi plugin?
I have disabled the plugin. The problem is still there unfortunately š
Any modifications to archive.php in a child theme? Or to the loop in functions.php?
Hi,
No, I have not modified the loop in functions.php or archive.php
Thanks for your help.
Do you have your Front Page and Posts Page set to static pages? If so, what did you use to create the Posts page?
Hi,
Yes, I have my posts page set as a static page and my front page set as a static page.
To create the posts page I created a page called ‘News’ and set this in WP options as the posts page. Thats it! WP took care of the rest and displayed my posts on this page.
It looks like you have the number of posts per page set to 10. How many posts do you actually have?
I just configured a clean install of Hueman v1.5.4 from wp.org, added two pages, set the static pages, added 13 posts, and the pagination works without any problems. I could try it with v2.2.3 from the theme website but, since they share the same base code, I’m guessing the results would be the same. Maybe there is a conflict with one of your plugins?
I found the problem.
I just disabled every plugin, removed every line of custom code bit by bit and it’s this:
<?php query_posts('cat=-8'); ?> // <<---this
<?php if ( have_posts() ) : ?>
in index.php
I need to exclude category 8 from my main list.
I guess doing query_posts is overwriting the main query which is then excluding any pagination logic?
I’d remove the code from index.php and try adding a function in your child theme functions.php file:
function exclude_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'cat', '-8' );
}
}
add_action( 'pre_get_posts', 'exclude_category' );
Here’s a reference in the WP Codex.
Thank you that works perfect š
You’re welcome. Glad I could help. If you don’t need any further assistance with this topic please mark it as Resolved. Thanks.