Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi game_0ver. Can you check the link you posted? I got a 404 Not Found error. Thanks.

    Thread Starter game_0ver

    (@game_0ver)

    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?

    Thread Starter game_0ver

    (@game_0ver)

    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?

    Thread Starter game_0ver

    (@game_0ver)

    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?

    Thread Starter game_0ver

    (@game_0ver)

    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?

    Thread Starter game_0ver

    (@game_0ver)

    Hi, I have 15 posts.

    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?

    Thread Starter game_0ver

    (@game_0ver)

    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.

    Thread Starter game_0ver

    (@game_0ver)

    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.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Pages not working on blog posts’ is closed to new replies.