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
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
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.