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 have a page called Food which displays posts from 2 custom post types - Recipes and Restaurants.

How do I add 'food' to the permalink just for those two custom post types? - e.g. www.mysite.com/food/recipes/thepost

share|improve this question
up vote 1 down vote accepted

Check out the rewrite parameter for register_custom_post_type. You may specity a slug that will be added before. So if you have two separate post types for recipes and restaurants set for one '/food/recipes' and for the second one '/food/restaurants'. You must visit the Settings->Permalinks after this is done so that the rewrite rules will refresh.

share|improve this answer
Perfect thanks! – fxfuture Jan 9 '12 at 16:02

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.