You can use a slug, when you are registering the post type with register_post_type(). You can add this argument like this
$labels = array(
//... add the labels as you need
)
);
$args = array(
'labels' => $labels,
//add other options as you need
'rewrite' => array('slug' => 'view-promotion')
);
register_post_type( 'promotion', $args );
}
EDIT:
You need some other identifier to differentiate between the page and your custom post type. Otherwise WordPress won’t be able to know whether you mean the view-promotion
page or the custom post type.
Even something like this will work
...
'rewrite' => 'view-promotion/a',
...
Related Posts:
- Mixing custom post type and taxonomy rewrite structures?
- How to rewrite URI of custom post type?
- Custom rewrite rules for archive page and single post
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Custom post types – Use post_id in permalink structure
- Custom Post Type and Taxonomy URL rewrite
- Custom post type permalink: only use %post_id% and remove %postname%
- Rewrite custom post type rss feed links
- Add category to custom post URL
- Creating a custom public user page
- Archive page with multiple taxonomies rewrite
- rewrite get parameter with custom post type
- How to filter custom post type archive by meta value
- Taxonomy archives based on Custom Post Type
- Multiple custom post types using the same taxonomy = URL frustrations
- Permalink rewrite with custom post type and custom taxonomy
- Taxonomy page returns 404 page not found
- Child pages on hierarchical Custom Post Types 404s
- Remove unwanted part of permalink custom structure from CPT url?
- How to have a custom URL structure for a custom post type?
- Permalinks for CPT breaks permalinks to pages
- WordPress custom post type url change
- Changing a custom post type “has_archive” after registered
- Possible to change the slug of default post type?
- Custom Post Type rewrite redirects to homepage
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Custom Post Type slug same as page name causing a conflict
- Adding paged query to custom URL rewrite
- Custom Post Type rewrite rules not working, how to alter the rewrite order?
- Rewrite Custom Post Type URL slug
- Customising rewrite rules for CPT single post URL to work as paged URL
- Remove custom post type slug not working for child pages
- Custom WP TItle from custom template with dynamic URL structure
- Rewrite rules for custom post type slug
- Change URL of posts and also Custom Post Type
- Custom Post Type rewrite
- Can’t change first part of URL rewrite for custom post type
- CPT Archive with core Category
- How to have custom post type /example/ and then posts /example/posts.html
- Remove url rewrites for registered taxonomies
- Change custom post type slug from plugin options
- 404 Issue w/ Custom Post Type – using Meta for Permalink rewrite
- Get Taxonomy Term Title by it’s URL
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Custom rewrite url category
- Using taxonomy term in CPT permalink – Pages 404’s
- How to add rewrite rule to custom post type with parent in url with cpt ui?
- Programmatically rewriting slug through functions.php but returns 404
- How do I change the custom taxonomy slug to be the same as the custom post type slug?
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Rewrite custom post type url – Multiple post types
- Why isn’t my custom post type archive URL translating?
- Rewrites/query for multiple hierarchical custom post types
- Post Type rewrite rule to point to custom Page/template
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Taxonomy in URL
- Custom URLs in post types make it impossible to view archive
- Custom Permalinks for Custom Post Types
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- Share root slug for Child Page and Custom Post Type (prioritizing child pages over posts)
- Route subpage to Custom Post Type
- Custom Post Type Category URL
- Custom Post Type Advanced Slug
- How do I know if a rewritten rule was applied?
- How Can I Remove Custom Post Type Slug From URL
- WordPress custom permalink and archive link for custom post type
- get_post_permalink() and custom permalink rewriting
- Custom Post Types and Removing Slugs – should we do it?
- Pagination for custom post types – url rewriting
- Taxonomy rewrite pagination 404
- Custom rewrite rule takes place AFTER the generic category rule
- Adding /blog in front of single posts (only)
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- multiple URLS for the same page
- How to properly set the rewrite rules for this case?
- Define multiple prefixes for custom post type
- How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug
- Custom Post Type parent/child relationship rewrite rules for permalinks
- Custom post type structure + permalink structure
- Custom Post Type canonical link / pagination redirecting to root
- Rewrite URL of Specific Post of Custom Type
- Using get_post_type with a custom URL format?
- Show index and not the archive for “Dog Custom Post” with default slug
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- Remove custom post type slug but keep related category taxonomy permalink
- page not found for example.com/custom-post-name
- Force WordPress to only match URL in category
- Paging not working for hierarchical custom post type
- Custom post type with parent page? Possible?
- current_menu_parent for custom post type and custom url
- Custom Post Type URL Rewriting
- Why won’t this rewrite rule work?
- Cannot modify a registered custom post type rewrite slug
- Custom post type and custom taxonomy archive inaccessible
- Generating custom URL before post is published
- Custom post type permalink structure
- How can i change url structure of cpt like this?
- Menu Structure and URL structure, with Pages and Post-Type-Posts