Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.