11 responses to “Previous, Next links”

  1. Blogging Pro - Blog News, Tools and Hacks » WP Plugin: Previous and Next Links

    [...] 085944494); Filed under: WordPress Plugins|@ 1:14 PM {} Huddled Masses has a newly written plugin giving your WP weblog a next and previous link [...]

  2. ian

    Neat !

    I have two comments to make: the first is that I had to change the first RewriteRule statement syntax to cope with sub-categories (basically it needs to be able to pass a / in $1), so it now looks like this:

    RewriteRule ^category/(.*)?page/?([0-9]{1,})?/? /index.php?category_name=$1&paged=$2 [QSA,L]

    and the second is that with the system as it stands, searching isn’t so hot. On a search for the letter ‘a’ (I wanted to make sure the paged limit was hit !) I end up with the following URL for the second page:

    http://my.demo.blog/index.php?s=a&paged&2

    which isn’t so great. I’m not sure yet why the = has become a 2, but so far that’s the only real show stopper from taking this plug-in live.

    Thank you very much for making such an easy to use and neat Prev/Next.

  3. ian

    Aha ! A simple mistake sorts out the extra ampersand – towards the end of the get_pagenum_link function, change the line after the if stristr to read:

    $qstr .= $querystring_separator.$page_querystring.$querystring_equal.$pagenum;

    It’s just a typo – there is a global definition for $querystring_equal above this point, but it’s never used.

  4. Joel a??Jaykula?? Bennett

    You’re right. I’ve corrected those two things, and actually another place where I’d placed $querystring_separator instead of $querystring_equal … thanks for the feedback. I’ll try to remember to test the search and nested categories next time [ ;-) ]

    Man, with all that code in your comment, I’m rethinking my css formatting strategy [ :-p ]

  5. Blogging Pro - Blog News, Tools and Hacks

    WP Plugin: Previous and Next Links
    Huddled Masses has a newly written plugin giving your WP weblog a next and previous links to add anywhere on your index page. Supports search engine friendly URI’s too once you’ve added some mod_rewrite code to your .htaccess file.

  6. David

    What change would be needed to make it instead of /page1 to end on /, like /page1/?

    TIA!

  7. Jerome

    Just to check…
    Where exactly do i put the codes concerning the styles?

  8. Joel "Jaykul" Bennett

    David: I think the only change would be to the next to last line of code (line 86):

        return get_settings('home').$qstr."/";
    

    Jerome: the styles are CSS, so just put them in one of your current style sheets (eg: wp-styles.css)

  9. digressions


    Huddled Masses…

  10. Tinuviel

    The plugin file is gone or isn’t working – can you bring it back?

  11. Joel "Jaykul" Bennett

    Sorry, I had a problem with it when I installed a nightly release, and I unthinkingly renamed the file instead of just disabling it temporarily [blush]