Viewing 12 replies - 1 through 12 (of 12 total)
  • Only that’s not the post ID so that isn’t going to work…. what he(she?) wants to do is goto page 2 of what ever post…. I know what he is after is when using the Next/PRevious pages links, they come out all funky…. Not sure what the answer is though. Because simply setting the rewrite isn’t going to do much good if the function doesn’t return it in the appropriate fasion.
    TG

    Perhaps more permalink options should be available in 1.3, then.

    Thread Starter wairoanz

    (@wairoanz)

    Well the links “look” fine now… but clicking them leads to my 404 page… ?? I’ll need to switch back and scratch my head a bit longer.

    Users of 1.3:
    wairoanz – I don’t know what version of WP you are using but I just finished cannibalizing the plugin and letting it use WP’s function for get_pagenum_link so it behaves much better. I deleted lines 13 and 14 (global stuff) and lines 19 through 32 ($qstr stuff) and changed the echoed links to:
    echo ‘ href="' .get_pagenum_link(1). '">'. $prelabel . 'First ... ';
    echo ' href="' .get_pagenum_link($i). '">'.$i.' ';
    echo ' ... href="' .get_pagenum_link($max_page). '">Last ' . $nxtlabel . '';
    Might as well use what is already built into WP

    Thread Starter wairoanz

    (@wairoanz)

    Hi Beel… I’m using WP 1.2… I’m a bit nervous about upgrading in case all the plugins (that I have finally got whipped into shape) stop working. I’m also using Root’s Gemini index.php. Or do you think an upgrade would go smoothly?

    Unlike Kerry, I am perfectly willing to say, “I prefer not to answer that question.” I suspect get_pagenum_link is functionally the same in 1.2 – but don’t know. If so, it should work fine. You can check out the links in my page – the category paging works now, too.
    Just do a backup of the page-navi and give the changes a whirl – but don’t delete anything first, just do the echo substitutions above. If it works then you can start deleting what will then be irrelevant code.

    Thread Starter wairoanz

    (@wairoanz)

    ??
    Fatal error: Call to undefined function: get_pagenum_link() in /home/httpd/vhosts/wairoa.com/httpdocs/wp-content/plugins/page-navi.php on line 47

    Works like a charm! Thanks again Beel.

    I’m not sure how these will work with any existing rules, but by themselves they should work
    https://www.xyz.com/index.php?paged=2https://www.xyz.com/page/2/
    Needs
    RewriteRule ^page/([0-9]+)/$ /index.php?paged=$1 [QSA]
    and…
    https://www.xyz.com/index.php?category_name=general/&paged=2https://www.xyz.com/general/page/2
    needs
    RewriteRule ^([a-zA-Z]+/)page/([0-9]+)$ /index.php?category_name=$1&paged=$2 [QSA]
    Like I said, I have no idea whether those will conflict with existing WP links… you may find you need to change the “page” in the first part of the rule (and in the urls) to something else. Anyway, hope that helps.

    Thread Starter wairoanz

    (@wairoanz)

    No luck with that, Cubal. But thanks very much for giving it a shot.

    Cubal,
    That works great for the normal index page – thankyou! – but the categories rule doesn’t work.
    My links are something like https://www.organicchurch.net/categories/general/ but I’ve tried a number of variations to your rewrite to get it to work.
    I’m also trying to get one for the listings of posts I have by different authors, which currently look like: https://www.organicchurch.net/archives/author/graham-old/
    If I’m missing something obvious, I’d love to know! :o)

    Is this even possible?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘SEEKING: Super ReWrite Man!’ is closed to new replies.