since WP 4.4.0, you can use this filter that allows you to change the arguments used in the original cpt registration.
Add this to your functions.php file:
add_filter( 'register_post_type_args', function( $args, $post_type ) {
if( 'wyde_portfolio' === $post_type && is_array( $args ) )
$args['rewrite']['with_front'] = false;
return $args;
}, 99, 2 );
It’s taken from a recent answer, https://wordpress.stackexchange.com/a/224376/39150
Hope it helps!
Related Posts:
- Custom page slug without creating a WP page
- Redirect to another page using contact form 7? [closed]
- Rewrite/Change custom taxonomy slug
- How to check if a theme is active?
- How to maintain W3C standards compliance of a theme
- Difference between a theme and a plugin?
- How can I have two different urls for the same page that load two different templates?
- All shortcodes not working on custom theme
- Disable plugins on cron and ajax page
- How Do I add a redirect rule to WordPress?
- Is it good practice to remove redundant plugins and themes?
- Ship plugin with a custom theme
- Declare a function before plugin does on the theme functions.php file
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- flush_rewrite_rules not working on plugin deactivation, invalid URLs not showing 404
- Whats the difference between Page Builder Plugins and Theme Builder Softwares? [closed]
- How to use load_plugin_textdomain from within a theme
- Theme and Plugins sharing common libraries
- Is there a quick way to inject i18n domain into theme/plugin files?
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- How can I rewrite a plugin generated URL?
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Can I share predefined fonts from theme_support with a gutenberg component?
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- add_action in functions.php, do_action in plugin?
- WordPress 5 upgrade: until when is it safe to keep project running in 4.x?
- Implement plugins as part of a theme
- Theme or Plugin: Where should I write my code?
- Remove rewrite rules generated by plugin during deactivation
- How does WP handle multiple matching rewrite rules?
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Do I still need a theme to use page builders?
- Can I make a super plugin that also has a theme?
- Reduce Drop down Menu Width in WordPress
- Prevent WordPress installing plugins and themes via Admin
- Plugin Handle URL With Custom Theme
- Check for security updates
- Plugin-generated pages use Not Found or Pages Archive templates?
- Classified ad website : which solutions to use? [closed]
- Remove /product/ from url. I want only category name then product name
- All sites themes functions.php have been changed
- Finding the URL to be used to check if plugin is installed with a theme
- “No Add Button” for me to customize my WordPress with themes and pluggins
- How can I list all installed plugins/themes/versions from CLI/API?
- Removing Automatic Redirects Without Plugin
- Why does my file_exist check fail?
- How to protect WordPress from security scanner [closed]
- Custom url rewriting
- how can I query all wordpress users of a blog
- how to activate a plugin inside a theme
- There has been a critical error on your website – won’t fix no matter what
- Is it possible not to load theme on a specific page in wordpress?
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- I receive taxonomy id
- To perform the requested action, WordPress needs to access your web > server
- How to extract a .wp-env.json or composer.json containing plugin versions from a production website?
- How to include files relative to a file’s directory
- Override css rules of a plugin within my own theme
- Blocking Plugin Css to load custom in template directory
- Passing value as hidden parameter to next page
- After a manual update, themes and plugins that were installed (and still in the directory) are not being seen
- Display WordPress comments before the plugins?
- Mobilepress fails to translate short codes
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- In Multisite Setups, how to update mass sections of sub-sites
- Remove custom taxonomy name from the slug – Custom Post Type UI
- How to override any plugin file in the child theme
- add_rewrite_rule to load different page, without changing URL in browser
- Replace old theme that understand old css (vcex_icon_box css_animation)
- Mobile Menu and Mobile Sidebar missing
- custom fields not displaying on wordpress site
- elementor development – custom widget like an inner section widget
- How to get a post views count using ‘WordPress popular posts’ plugin
- Can’t add new plugin or themes on a wordpress multisite network from the primary site as administrator. Error: ERR_TOO_MANY_REDIRECTS
- How to prevent redoing get_posts queries and make results available to other scripts?
- Change custom rewrite rule when permalink is updated/changed
- Is it possible to disable a theme programmatically?
- Google trying to index child theme files
- How to create multi-slug admin page and retrieve it with $_GET or something?
- In the WordPress API is there a way to set the width of the post/page container
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to regenerate slugs for categories and tag converting non-Latin characters?
- What Are the Advantages of Using an mu-plugin
- How to fix On “An unexpected error occurred” message when I click on Add new theme or plugin?
- How to display post by date written (1974) and not date published (today)?
- Things that saved lose when logout
- Automatic updates of plugins and themes outside of wordpress.org
- Theme specific plugin, how?
- How to programatically create a simple HTML page using the permalink of a WordPress post?
- Rewrite rule help for gallery plugin
- Run WP inside a other Site without using frames
- Breadcrumb is not generating the correct post page url
- Theme causing SSL break on chrome
- Why does theme need woocommerce to show images / content on front page?
- My Blog page ( posts page ) theme isn’t changing with the new theme [closed]
- How to create an Info Box on WordPress [closed]
- How to make content as required in custom post type?
- Any plugin installation and update overwrite current theme
- Convert from Portfolio post to WooCommerce products [closed]
- Problem on a wordpress website with a plugin [closed]