• Resolved zurih

    (@zurih)


    Hello people,
    I got a very strange problem.
    When I try to navigate to older posts by clicking the older posts link at the end of the page, it brings me to /page/2, but the page itself doesn’t change – it just reloads the latest page.

    I tried to reset the permalink settings to ‘Default’, but still the same issue.

    My .htaccess:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    My plugins:
    Akismet
    All in One SEO Pack
    Contact Form 7
    My Page Order – disabled – didn’t help
    opular Posts
    Post-Plugin Library
    Reveal IDs
    The Excerpt re-reloaded
    WP-PageNavi – disabled – didn’t help
    WP No Category Base

    Any idea?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you using any sort of custom query?

    if so check out:
    https://go.rvoodoo.com/paginate

    Thread Starter zurih

    (@zurih)

    I see this in my header.php:
    <?php query_posts(“cat=-11”);; ?>

    Is this considered as custom query?

    It is, yes. That says to ignore category 11 from that particular loop.

    Although I’m not sure what loop that is, as header.php is not the normal place for a loop

    Maybe you have some sort of featured post thing going on?

    Normally the loop is in index.php (at least the main one), but anywhere you use query_posts, you need to account for pagination in the query.

    Thread Starter zurih

    (@zurih)

    Yeah sorry it was in index.php not in header.php.

    I figured out that “-11” category is for my blog entries, so it won’t show up with my articles.

    Thing is, when I’m in a specific category, and use the page navigation there – it works… problem is only when trying to navigate through pages from the main index page…

    Thread Starter zurih

    (@zurih)

    This is the full index.php code:

    https://wordpress.pastebin.com/LKVzrbJJ

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
                                      <?php query_posts("cat=-11");; ?>

    this query needs to look more like this:

    <?php query_posts( array(
          'cat' => '-11',
          'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ),
     ));
    ?>

    Thread Starter zurih

    (@zurih)

    You’re the man!!
    Thank you!

    Very glad it worked for you! And thank you for marking the topic resolved!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Page Navigation doesn't work’ is closed to new replies.