I'd like to change the URL of the <?php previous_posts_link ?> and <?php next_posts_link ?> that are being outputted by Wordpress.


When I am on my single page, I am getting this kind of an url:


What I like to achieve:

When I am on my single page, I would like to get:


So, the URL without the post title!

I don't know if this is even possible, but I'd like to understand if this is doable or not.

Could someone help me out here, please?

  • I'm sorry, but this doesn't make a lot of sense. example.com/2 would be the second page of your blog. Why would that be the "next" link from a post? – Jacob Peattie Jul 5 at 10:04
  • Well, because I am fetching posts in my sidebar, which interacts with page/2/, page/3/ and so on. So it does make sense for me and it actually works fine on my homepage, but not on the single pages... – Siyah Jul 5 at 13:04
  • Nobody who can help? – Siyah Jul 9 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.