Use the register_post_type_args filter to alter post types registered by code you don’t control.
You can set it for a specific type:
add_filter( 'register_post_type_args', 'wpd_change_post_type_args', 10, 2 );
function wpd_change_post_type_args( $args, $post_type ){
if( 'turnips' == $post_type ){
$args['rewrite']['with_front'] = false;
}
return $args;
}
Or remove that $post_type check to change it for all custom types.
Related Posts:
- is_singular() not working if called via callback function of admin-ajax.php
- Custom post-type in root directory, blog posts in subdirectory
- How to stop subdirectory wordpress install adding head elemets to entire site?
- How to post twitter like updates on wordpress
- Blog page showing same content as homepage
- How to create Blog Post Specific Widget
- Display Only Certain Category In a Custom Page Template
- Add Pagination in custom Blog page template
- Post display in separate page [duplicate]
- Excert ( the_excerpt(); ) Not working properly
- Add /blog to the “post” post type url
- Wp-theme Development
- Custom post type disappeared in wordpress when I transferred theme to Showit
- Change permalinks for posts but not for custom post types
- Sort custom post type list table by display name of a user id stored as post meta value
- Assign single template to multiple custom post types?
- Get posts based on meta key/value
- how to filter by last name for custom post
- Search that will look in custom field, post title and post content
- Create a dropdown with Custom Post Types as option in admin
- Get categories for a specific post – Custom post type
- How to do a custom bookmarks post type?
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Term Checklist Walker – Disable Parent Categories
- Limiting number of custom posts shown on taxonomy page
- Save or update data when custom post published
- Lock draft option after to publish my custom post
- 404 error on custom post type
- How to count custom post types with conditional operators
- Front End submission with meta key
- Using wordpress template tags within an array
- Hard code the nextpage tag into my theme?
- How to use the post_title of custom post type as taxonomy
- Add acf field in title (admin table)
- URL of a custom post type’s post format archive?
- Display posts from Custom Post Type in category page on front-end
- Why can’t my admin account manage attachments on a custom post type with a unique capability type?
- 404 Issue w/ Custom Post Type – using Meta for Permalink rewrite
- Single posts for one CPT UI post type are 404s
- Mixing 2 custom post types with posts output in specific pattern
- How to automatically set ‘default image size’ for specific Custom Post Type
- Create custom post type (using pods) then convert existing pages to custom post type?
- Tracking changes in admin-page so user gets warning when leaving the page
- Page builder plugins Vs advanced custom field and Custom Post type [closed]
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Not getting posts of custom post types
- Custom post type pages return 404 page?
- Filter date from post meta when date is in string format
- Send a conditional email notification when a custom field value changes in Post Type
- Check for a specific taxonomy of a custom post type
- Add custom CSS class to custom post type
- Dynamic bootstrap tabs with post_title doesn’t display the_content
- Custom taxonomy page returns 404
- portfolio custom type tags support
- Why does wp_update_post causes white screen?
- Targeting custom post type via functions.php doesn’t work
- Custom post type suddenly stoped working after WordPress 5 update
- Custom post type to lead to single post type instead of shortcode modal
- Filter posts of custom post type by meta key in (List All Section)
- is_main_query() never called on WP 4.4
- Change post type depending on shortcode
- Set Default Option Value as Blank for Meta Box
- Query Posts, order by meta value
- How to add a class to meta boxes (to customize them in CSS)?
- custom post types missing ADD NEW
- Custom post type menu button color
- adding page types in menu
- wp3 custom post types rss
- Drop down list with posts within the “add new” page
- Custom taxonomy not saving correctly
- How to have multiple archive pages?
- Custom Post Type Rewrite Throws Headers Sent Errors
- How can I sort the order of multiple custom field values in a custom post type?
- How to add comments to my custom post type but hide it from default WordPress Comments section?
- I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics
- Custom taxonomy does not display in custom post loop
- Custom post type rewrite slug translate?
- Change display of product price on product show page only
- CPTUI rewrite disable when no post in CPTUI has been found
- Dupplication of Custom Post Type while adding attachment
- Simple Data picker meta box
- Custom post template doen’t have any
- I have a problem with displaying children pages of custom post type
- How to properly set a value to meta fields of a custom post type in WP-API/node-wpapi REST API?
- Infinite scroll doesnt work
- When post is Published, insert into custom table a number – custom post type
- Is it possible to add a cpt that can only be viewed in backend, not edited?
- Custom taxonomy page template
- How do I put `tax_query` in this WP_query?
- Can’t use orderby in WP_Query
- How to display elements of different post types?
- Multisite – Echo admins profile meta
- Radom post image/link based on custom taxonomy
- Post AND page parameter for WP function
- Creating additional page with own URL for each custom post
- exclude posts from a custom category
- Display taxonomy color in custom post archive
- Using wp_insert_post to create custom posts with ACF image field
- REST API callback function is not called
- How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?