When you’re registering a custom post type in WordPress, one of the arguments is ‘rewrite’, which allows you to set up a slug for your custom post type. In your example above, you would set the rewrite argument to 'rewrite' => array('slug' => 'recipes')
to create a URL structure like http://example.com/recipes/general-tsos-chicken
You can also add custom post types with a plugin like Custom Post Types UI. That plugin has a field in the advanced options for adding a rewrite slug.
Related Posts:
- Custom Post Type: Get most recent permalink
- Changing permalinks gives me 404 errors on nginx
- Strange permalink issue: can’t rename /company-2/ to /company/
- How to get permalink and title from post ID?
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Using $_GET variables in the URL?
- Removing leading zeros from custom permalink structure
- Move WordPress to subdirectory, keep ALL URLs
- How do I turn off 301 redirecting posts (not canonical)?
- How can I include a query string with get_permalink
- Permalink: postname EXCEPT for blog
- Custom taxonomy & post slug permalink
- %tag% in permalink not working
- How to assign a Permalink to a Function
- Custom Taxonomy List links being re-written
- Rewrite rule never matching
- How to get blog id from permalink?
- Custom url for a single page
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Date archive permalink modification
- Using ‘Primary Category’ in URL
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Changes to permalink structure results in 404 error for all pages other than home
- Custom post type hierarchical permalinks not behaving as expected for parent/child pages
- Filter string like a slug
- I need a custom permalink for my website
- Woocommerce Product Attribute Permalink doesn’t work?
- Permalinks not working
- Change Permalink Structure for Tag.php template
- Problem with wordpress links on a live site
- Why wordpress multisite root site showing blog prefix by force?
- Remove post type slug of all post types from permalinks
- Permalink change redirects by WordPress [duplicate]
- page nested 3 levels deep shows 404
- Removing /author/ slug from URL gives 404
- Confusing about permalink
- WordPress custom post type permalink rewrite shows page not found
- Programmatically Restrict WordPress from using certain URLs or sub-directories
- Removing custom post type slug from URL
- Title attributes on Permalinks for posts and products
- How to include sub directory in sitemap? [closed]
- Post preview gives 404 when permalinks are purely date based
- Custom $_GET vars in wordpress entry with permalink
- WordPress Not Using Template Files After Permalink Update
- Permalinks only for posts
- rewrite rule to redirect to the most recent date permalink
- How do you create %post_type%/%postname%/ permalink structure?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Can variables be used to rewrite a Custom Post Type permalink? [duplicate]
- How to link the title adding a permalink?
- Visiting posts results in 404 errors after host migration
- Suddenly new posts have the default permalink instead of the post name
- Permalink Settings
- rename ‘page’ URL fragment in pretty permalinks
- Can’t get permalinks working!
- Set parent for custom post type archive rewrite url
- How to rewrite the beginning and end of the permalink structure in a custom post type?
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- WordPress not generating .htaccess but tells me that (Permalink structure updated.)
- Permalink with anchor on home page to single page
- How do I keep multiple domain for my wordpress site
- How to setup a permalink structure for a custom post type
- how to set up wp in folder within static website?
- Create custom links for excerpts with php dynamically
- placing the media uploads in a subdirectory
- WordPress custom posts and permalinks
- Permalink Structure not updating .htaccess
- Multiple sites with pretty permalinks with nginx
- mod-rewrite rules grabs “broken permalinks”, too
- Creating an alternate path for a page
- Permalinks causing wp-json to 405
- How to change URL from /%postname%/ to custom-name/%category%/%year%/%monthnum%/%day%/%postname%/
- How to prevent wordpress from lowering Capitalized letters
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- Disable -2 Permalink Addition
- Permalink in relation with the files
- Every sub page shows Error 404, i have check permalink but still same issues
- Permalink structure /page/page/cpt-post gives 404 with pagination
- Changing permalink structure for Posts
- Allowing slash in slug/permalinks
- Creating custom post type relationships
- Author permalink
- Multiple Permalink Patterns for one page
- When is a good time to reset permalinks?
- WordPress permalinks first word title
- WordPress permalink issue on AWS
- Permalink for Author’s Posts in a Category
- WordPress Pagination Not Working After Transfer from Localhost
- Why doesn’t WP update my .htaccess file?
- How is a URL getting mapped to a page template
- What is the issue with our links? It creates a loop
- Routing ‘fake’ sub sub posts
- How can you preserve URLs when moving posts to a custom post type?
- Page and post auto links
- how to make follow?
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Stymied by 500.5 error for WordPress on IIS 8 / Windows Server 2012
- What is the best way to relate different custom post types?
- Modify permalink of CPT archive to support two taxonomies
- Allow child pages with the same base as the CPT slug