0

How to add an auto-increment number for each post's URL just before slug.

For example, the URLs will be:

https://website.com/1/post_name
https://website.com/2/post_name_2nd_post
...
https://website.com/999/post_name
2
  • have you tried putting the post ID in the permalink on the settings page?
    – Tom J Nowell
    Commented Sep 28, 2022 at 12:02
  • Post ID will not work, as client wants to decide from which number he wants to use for auto increment. Then all the published posts will have auto-incremented(+1) numbers for them. For example, client decides to start with 1000, then first post will have number 1000, 2nd = 1001 and so on. Commented Sep 29, 2022 at 9:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.