0

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

1

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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