How do I change the URL returned by next_posts_link()?

I am going to assume you’ve got blog.php?page=2 working since you stated that’s what you wanted. It seems like you might have to pull off a lot of magic to hide /blog/ from your users. Not sure why you want that, so I’m going to ignore that and just give you a solution that might work.

I don’t see a function to grab the current page. If one exists, you could add one and then just hard code the nav links in your theme. You’ll need a little logic to be sure you’re not sending to a page that doesn’t exist ( are you on the last page already? )

You could also parse the number off of the get_next_posts_link() to get the number and go from there. Something like

$parts=split('" >',get_next_posts_link());
$numparts=split('=',$parts[0]);
$number=$numparts[-1];

should do the trick.

should give you an array where item 0 is