Viewing 7 replies - 1 through 7 (of 7 total)
  • Probably need to set your query_posts to adhere to pagination rules:

    Something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts($query_string . '&paged=' . $paged);
    ?>
    Thread Starter Dave Redfern

    (@daveredfern)

    Thank yuo for your reply.

    I have added this to below

    <?php if (have_posts()) : ?>

    which i assume is the right place but it doesn’t seem to effect the URL paths of the previous links at the bottom.

    Do I have to do anything else for this to work?

    Dave.

    If would be before the if (have_posts()) but you may need to post your Template that is displaying your archives at a pastebin and report the link back here.

    Thread Starter Dave Redfern

    (@daveredfern)

    i have the following code on the archives page – https://pastebin.com/m5e74bbf9

    thanks again MichaelH.

    Dave.

    You code works right for me (i.e. next/previous links return expected posts) when displaying archives.

    Using the WordPress Default Theme for testing, I replaced the archive.php with your code. No plugins active, and successfully used both Default and Month and Name Permalinks.

    Thread Starter Dave Redfern

    (@daveredfern)

    This is wierd.

    I don’t know if it is something because I am on a windows server but I can’t get it to work ??

    I also tried it on a local install and it works!

    Do you have any idea what I could do? is there a way of changing the URL so it goes to /press/?paged=2 instead of page/2/?

    Thanks again MichaelH!

    Dave.

    I recently ran into this – and after updating the permalinks all worked well so make sure you try that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Pagination links not working’ is closed to new replies.