Why would you want to do this?
If you are trying to do some type of programming and need the ID on the front of the site just echo it so its visible. From a website side this is just horrible for SEO.
I want the link to be shorter and have post id.
http://www.example.com\product\product 1
change to
http://www.example.com\%post_id%\product 1
can i do this?
hello @automattic
can you help me please?
-
This reply was modified 5 years, 4 months ago by
kingofthepnu.
Hi there!
You can easily achieve it by adding “/%post_id%/” to your product’s permalinks structure as a “custom base”.
Here’s an example:
https://d.pr/i/eKQJQG
Once done, your products URL will change to something like this:
http://mysite.com/40129/product-title/
(Being 40129 the ID of the product)
I hope it helps!
Hi @kingofthepnu,
I hope this solution works out! If not feel free to reply and it will re-open the thread.
If you have any other questions please open a new thread and let us know.
Have a super day and stay healthy!