WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use WooCommerce.
My links are looking like this at the moment:


but I want them to be like this:


how do I change them?

share|improve this question

Why do you want this? I can't see any good reason. It's much better for both usability and SEO to have the titles in the permalinks. But if you REALLY want this, you can use "/shop/%post_id%.html" as a product permalink base. You change this under "Settings" -> "Permalinks" and then at the bottom under the section "Product permalink base". Put the following as a "Custom Base":


share|improve this answer
Thank you.I come from China.The China Products name is too long,I follow what you say,but the links become like this:/shop/%post_id%.html/sample-product/ – user34335 Jun 21 '13 at 5:59

I tried answer by Pekz0r and It work if you used it with wordpress post but for woocommerce product it did not work maybe because the setting of wocommerce permalink defined just the url base which is url prefixes, I think you need to write your own rule in .htaccess

check http://codex.wordpress.org/Using_Permalinks for more info on permalinks and sample .htaccess

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.