you may try to de-register/unset default post type and register post type with your requirements.
if ( ! function_exists( 'unset_default_post' ) ) :
function unset_default_post( ) {
global $wp_post_types;
$post_type="post";
if ( isset( $wp_post_types[ $post_type ] ) ) {
unset( $wp_post_types[ $post_type ] );
return true;
}
return false;
}
endif;
Related Posts:
- Custom rewrite rules for archive page and single post
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Custom post type 404s with rewriting even after resetting permalinks
- Rewrite rule for Custom post type Monthly and Yearly archive
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- Hide admin bar on certain post type
- How to modify URL structures in custom post types and taxonomies or terms
- Archive page with multiple taxonomies rewrite
- Modify custom post type rewrite rules in a separate function
- Help with a TV series Rewrite structure
- Taxonomy archives based on Custom Post Type
- Change page /2 to /transcript with a Rewrite
- Permalink rewrite with custom post type and custom taxonomy
- Permalinks for CPT breaks permalinks to pages
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Custom Post Types: pretty search URLs and has_archive
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Custom Post Type rewrite redirects to homepage
- Adding paged query to custom URL rewrite
- WordPress rewrite my URL when i use pagination
- Custom Post Type rewrite rules not working, how to alter the rewrite order?
- Customising rewrite rules for CPT single post URL to work as paged URL
- Remove custom post type slug not working for child pages
- How much control do we have over CPT rewrite slugs? Can I create a “root” page for my CPT with out the page path, and then have paths for other pages?
- how to add extra GET parameters to post to url with add_rewrite_rule?
- Parent & Child Taxonomy slugs in custom post permalink
- Remove url rewrites for registered taxonomies
- Custom post type “preview” not working
- CPT custom archive template does not get loaded
- Display posts from Custom Post Type in category page on front-end
- How can achieve this permalink perfectly? domain.com/%category%/%post-name%
- Custom post type + category archive page
- 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
- Rewrites/query for multiple hierarchical custom post types
- Post Type rewrite rule to point to custom Page/template
- Canonical url differs from custom post type archive URLs
- How to get list of taxonomy slugs ordered parents>childs?
- remove base slug from hierarchical custom post type
- Rewrite Endpoints and CPTs – How to use in a plugin
- Make custom post types and pages place nice, re: rewrite
- add_rewrite_rule and passing variables for custom post types
- Use date in the URL of custom post type
- Get url.com/post_type/taxonomy/term work!
- Different rewrite rules for taxonomies and cp in multisite?
- Add a permalink variable onto custom post type URL after post name slug
- How to add custom taxonomy in custom post type permalink?
- Add parent post to Custom Post Type [closed]
- How to query 2 custom post types that need to share a slug?
- Custom rewrite to fetch feed data
- custom post type archive page has 404 error even though has_archive is true
- 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?
- SEO Concerns With Rewrite Rules
- 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
- Pagination for custom post types – url rewriting
- Custom Post Type with modified permalink structure results in 404
- Modifying rewrite rules to use /category//
- WordPress custom taxonomy page
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- Pages not appearing?
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- custom filtering admin columns
- multiple URLS for the same page
- How to properly set the rewrite rules for this case?
- Category permalinks don’t work even after flushing
- 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
- Rewrite URL of Specific Post of Custom Type
- The page or ad listing you are trying to reach no longer exists or has expired
- Default custom post type url
- How to build overlapping custom post_type and taxonomy rewrites without conflicts?
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Custom Post Type Rewrite – Page Not Found
- Permalinks for a custom post type – with a page template (custom query) and taxonomy archive
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- WordPress custom post type rewrite rule matches all pages returning 404
- page not found for example.com/custom-post-name
- Paging not working for hierarchical custom post type
- Rewrite for custom type and custom taxonomy
- Archive page for a custom post type using WPML
- Why won’t this rewrite rule work?
- Permalink clashing with Custom Post Type rewrite rule
- Rewrite rules causing hole
- CPT Template Not Showing – Getting 404
- Adding rewrite rules to Custom Post-type mixed with Taxonomy
- rewrite rules add a folder in the path
- Canonicalization + Custom Post Types not working as expected
- Custom Taxonomy in Permalink from post type
- Custom post type permalink structure
- How to add custom permalink struct with DYNAMIC author to a Custom Post Type
- Dynamic WordPress rewrite rules for multiple custom post types
- Need help creating a WordPress site that has a landing page and sub pages for an area (for example, “London”). Website will have 100’s of areas
- Remove date rewrite rule for custom post type archive page
- Rewrite taxonomy permalink appended to CPT archive url
- Display content based on multiple URL parameters—pretty URL or query string