The register_post_type_args
filter (available from WordPress v4.4 on) will allow post type registration arguments to be changed:
function wpse206329_custom_post_type_args( $args, $post_type ) {
if ( $post_type === "my_post_type" ) {
$args['rewrite'] = false;
}
return $args;
}
add_filter( 'register_post_type_args', 'wpse206329_custom_post_type_args', 20, 2 );
Related Posts:
- I broke it! Custom post type archive gets redirected to home
- Remove plugin’s custom post type archive page and single pages [closed]
- Simple Data picker meta box
- Custom Archive – hide posts until a search is made?
- How to check if a new private custom post type is created?
- The page or ad listing you are trying to reach no longer exists or has expired
- One of my headings is mysteriously coming up as a link in my CPT Archive
- Looping through image object using ACF and CPT UI [SOLVED]
- Default custom post type url
- Run query on specific admin options page and send results to select field in another function
- How can i remove post type archive URL?
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Link two different post using there post_id in post meta
- Custom post type that lets users create a set of posts?
- Include images from pages in wp search.php results in default wp search
- Create Inclusions and exclusions
- How to create groups like that in buddypress?
- Custom taxonomy archive slug overwrites static page
- Post that populates itself (almost) automatically using data from imported excel file
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Custom Fields through plugin in a Custom Post Type
- Can’t save custom post type fields
- Want to display my custom date archive to date.php but dont know how
- Enable shortcodes on custom post type
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- How to Create movie schedule by custom post type query
- Best Plugins for Complex Index of Resources [closed]
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- How can I generate a list of post-type specific categories?
- WP_Query return highest number only
- Display subcategories in the filter on CPT
- Remove custom post type generated by a plugin (The Events Calendar) [closed]
- Show custom taxonomy not in submenu
- Understanding the workflow of form creation plugin
- Custom Post Type tag taxonomy “Page Not Found”
- Adding CPT changes entire layout of my site except for the archive of that CPT
- How to load custom post type plugin after acf options page (or get settings from there another way)?
- Use Custom Post Type as Storage Container Without Registering It
- Loop carousel slider in wordpress
- Custom nav menu current item custom link problem
- How to Fix WordPress 500 Internal server error due to custom post type
- Custom Fields as Post Type Options
- get_post_types doesn’t work in plugin
- date archive future posts
- next/prev post link by relationship post 2 post
- Rewriting archive page slug to be different than custom post type slug
- How to display custom post type in a submenu?
- Plugin Error on activating
- Custom Post Type parent slug as menu item
- Customizing a plugin function using a hook
- Custom Post type archives / categories give 404
- Custom Info Box at end of posts?
- Site loads very slow for archive custom post type page
- Keep same archive.php for post from archive?
- Stop Custom post type from being searched via URL
- archive.php can’t find categorized posts
- archive-{custom_post_type}.php not getting recognized wordpress
- Archive.php is not displaying tags
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Custom post type category page not working
- Custom post types with date based archive
- Custom Post Types Archives and daily/monthly joke
- paging is not working properly on news archives page [duplicate]
- Add Excerpt On Quicksand Plugin
- Author profile comments system
- Custom Post Types in plugins?
- Plugins for putting Custom Post Types into the Menu
- How can I set up the URL for a category archive for a custom post type?
- Configure which plugin custom post types get registered
- ‘Blog Archive’ suddenly appeared on custom post type; how to remove
- Categories in custom post types
- Is it possible to remove the word “date” from archives?
- Display results from two Custom Post Types in page template
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Generate daily archive whenever any post type is added
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- Stop header code from showing in category page?
- is_singular won’t call my functions?
- Query Custom Post Type and sort by year
- Extending a CPT by Created by another plugin
- Custom post types not using archive structure
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- Pagination not working for archive
- how to pass args for archive.php query?
- How to add post type in masonry posts elementory widget
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Display Custom Post Type on Toolset Types Plugin
- Plugin – read post into blank page [duplicate]
- How to Create Short Code Using Custom Post type
- How to hide home title on pages and posts?
- WP_Query is getting the post but the_post() not rendering any Post
- make playlist from a custom post type
- Custom Post Type to Plugin
- Woocommerce product page is not showing custom css [closed]
- How to delete unnecessary custom post types in the UI
- add_filter > posts_where works partially
- Simple Share Buttons Add Plugin and Custom Post Type
- How to get ‘Products’ on home page?
- Retrieve a post with its ACF repeater fields in wordpress
- WP 4.4 upgrade custom post type cannot add new