Mr. Jo
Mr. Jo

Reputation: 5261

WordPress change post id in the permalink url

I've setup following permalink structure in WordPress:

http://localhost/%postname%/%post_id%

This works great but what I need is to change the post_id in the url. So I'm looking for a way to count the post_id in the url one number up. For example when I've this url here:

http://localhost/test/223

I need to change it to:

http://localhost/test/224

but without changing the post id by itself. Is the even possible? If yes, how?

Upvotes: 0

Views: 1015

Answers (1)

Eriks Klotins
Eriks Klotins

Reputation: 4180

You have to make your mind.

Either change the link structure to use e.g. slugs (http://localhost/%postname%/%slug%) and set slug = post_id + 1 when updating the post. Or update the post IDs

Upvotes: 1

Related Questions