• Resolved paul1107

    (@paul1107)


    my site is summerdress.org.uk.

    My problem is that my previous & next pagination links do not work, upon clicking they just return to the home page. the url changes to http://www.mydomain/page/2, page/3, etc, but

    My permalinks setting is /%postname%/.

    Has anyone any ideas, as its driving crazy…

    Code moderated as per the Forum Rules

Viewing 10 replies - 1 through 10 (of 10 total)
  • You could drop a copy of the relevant template file in the WordPress pastebin and post the pastebin url here. Perhaps someone will be able to spot the problem and suggest a solution.

    Thread Starter paul1107

    (@paul1107)

    Hi Esmi,

    Thanks for that

    The paste bin url is as follows

    http://wordpress.pastebin.ca/1790583

    Any help would be greatly appreciated!

    That does not look like a complete template file.

    Thread Starter paul1107

    (@paul1107)

    I’ve amended the file to show the index.php homepage template

    http://wordpress.pastebin.ca/1790661

    I hope that makes things clearer?

    Thanks

    Try changing <?php query_posts('cat=-11'); ?> to:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'cat' => 11,
    	'paged' => $paged
    );
    query_posts($args);
    ?>
    Thread Starter paul1107

    (@paul1107)

    HI,

    Thanks but I’m afraid that didn’t work. The page loaded but showed my links page? I’m afraid it showed No posts so I couldn’t test the pagination.

    Thread Starter paul1107

    (@paul1107)

    Just an update, but I changed the theme to Kubrik as a test, and the previous link work ok, and I can click through to previous pages.

    the url changes to mydomain.com/page/2… page/3… etc.

    When changing back to my original theme, I try the same, but even though the urls change in the same way as when testing with kubrik, the output still reverts back to the home page and shows now previous pages.

    Not sure whether that makes it any clearer for any one with suggestions?

    thnaks

    Sorry – that should have been:

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

    I missed the minus sign!

    Thread Starter paul1107

    (@paul1107)

    Hi Esmi

    You Beauty! that seems to have worked a treat, thanks so much for your help.

    Shane G – I’ll have a look at your plugin as well.

    Thanks for your contribution

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

The topic ‘Previous Next page’ is closed to new replies.