You can achieve this when you register your post types. The slug
can be a path:
$section_args = array(
'rewrite' => array( 'slug' => 'help/section' ),
// your other args...
);
$article_args = array(
'rewrite' => array( 'slug' => 'help/article' ),
// your other args...
);
Related Posts:
- Custom rewrite rules for archive page and single post
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Multiple post types – share same ReWrite slug?
- How to modify URL structures in custom post types and taxonomies or terms
- Adding meta values to permalink
- Permalinks so that one custom post type appears to be a child of another, not working
- Permalink rewrite with custom post type and custom taxonomy
- Prepend meta_value to permalink of post
- Permalinks for CPT breaks permalinks to pages
- WP Rewrite Rules – Custom post type & taxonomy
- Remove base slug in CPT & CT, use CT in permalink
- WordPress Rewrite rule for nested post types
- Custom Permalink Tag breaks Pagination
- Custom Permalink for Taxonimie and Custom Post Type
- Share parent path between Custom Post Types and Pages?
- Permalink Structure CPT With Custom Taxonomy Fails
- How to change custom post type permalink structure
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together
- How can achieve this permalink perfectly? domain.com/%category%/%post-name%
- Customize Custom Post Type URL
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Pretty URLs and custom post types
- Combine multiple CPT names to create valid permalinks
- Set parent for custom post type archive rewrite url
- Route subpage to Custom Post Type
- Rewrite permalink for multiple post types (CPT) with taxonomy term
- WordPress custom permalink and archive link for custom post type
- Rewrite URL for CPT to domain/post-name/post-id
- Custom permalink structure for custom post types including multiple taxonomy
- How to make “single post” permalink maintain it’s sub-page structure
- Two CPT: one is using part of the custom rewrite slug from the other
- WordPress custom post type rewrite rule matches all pages returning 404
- Parent cpt/child custom post type URL permalink relationship
- Custom post type permalink structure
- What is the best way to relate different custom post types?
- Mixing custom post type and taxonomy rewrite structures?
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- How to remove slug from hierarchical custom types in 3.5.2
- Custom post type permalink: only use %post_id% and remove %postname%
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Custom Posttype Inheritance (and url structure)
- How to Add Pages Under Custom Post Type URL Structure?
- How to check if last uri segment is a custom post type or taxonomy term?
- Permalinks using event date (year & month) instead of publication date
- Including two taxonomies in a permalink structure
- Permalink Structure problem with cpt and custom taxonomy
- how to use two permalinks for one custom post type
- single-{post_type}.php is not loaded despite flushing rules
- Rewrite numeric ID parameter for hierarchical custom post type
- Custom Post Type and Custom Taxonomy Permalinks
- Pagination problem
- remove permalink “front part” for custom post type
- Change Permalink Structure for Tag.php template
- Remove url rewrites for registered taxonomies
- 404 Issue w/ Custom Post Type – using Meta for Permalink rewrite
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- WordPress custom post type permalink rewrite shows page not found
- Using taxonomy term in CPT permalink – Pages 404’s
- How do I change the custom taxonomy slug to be the same as the custom post type slug?
- Post Type rewrite rule to point to custom Page/template
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom post type permalink returns 404
- Make custom post types and pages place nice, re: rewrite
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Rewrite rule for Custom post type Monthly and Yearly archive
- Custom permalink with child taxonomy terms
- Add a permalink variable onto custom post type URL after post name slug
- How to query 2 custom post types that need to share a slug?
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- Custom Post Type Advanced Slug
- URL Rewrite – Page Archive
- How to setup different permlalinks for posts and pages?
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- multiple URLS for the same page
- How to properly set the rewrite rules for this case?
- Category permalinks don’t work even after flushing
- Custom Post Type Single Page and Archive Page redirects to Home Page
- How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug
- Redirect Custom Post Type from Child Taxonomies
- Rewrite URL of Specific Post of Custom Type
- Custom post type rewrite and wp_pagenavi interfering with each other
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- Paging not working for hierarchical custom post type
- Custom post type with parent page? Possible?
- redirect old post type url to new structure url
- Multiple Custom Post Type permalink issue
- Custom Post Types and rewrite rules – One CPT works and a cloned one doesn’t
- Archive page for a custom post type using WPML
- Why won’t this rewrite rule work?
- Permalink clashing with Custom Post Type rewrite rule
- What is the proper way implement a global $wp_rewrite?
- rewrite rules add a folder in the path
- “regular” pages not found after changing permalink
- How can you preserve URLs when moving posts to a custom post type?
- Custom Taxonomy in Permalink from post type
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Custom archive URL as a subfolder of the custom post type slug