Add this on your register post type function:
'rewrite' => array(
'slug' => 'news',
'with_front' => false
),
The “with_front => false” will remove the “blog” from the path.
Hope that it helps,
Cheers
Related Posts:
- custom taxonomy and custom post type url conflict
- Redirect to another page using contact form 7? [closed]
- Add .html extension to custom post type taxonomies
- Woocommerce different URL for every table placed in the restaurant
- Author Specific URL’s in WordPress
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- Override plugin with functions.php
- Rewrite url without flushing the database?
- Best way to hook a custom url?
- How does WP handle multiple matching rewrite rules?
- How to make a proper custom post type link
- Edit Permalink Structure For Custom Post Type or Modify .htaccess?
- How do I convert my WordPress website to be domain agnostic?
- How to rewrite URL and get the values?
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Dynamic URL Rewrite for Custom
- Change language on website and change currency with url query
- add_rewrite_rule to load different page, without changing URL in browser
- Create category for each user
- Hidden permalink different from displayed permalink
- Change custom rewrite rule when permalink is updated/changed
- WordPress drop domain alias
- Creating custom URL for async content
- URL RewriteRule doesn’t work when using WP Database Participants in my WordPress website
- Calling an custom field from theme option at the frontend
- How To Rewrite WordPress Pages URL Only?
- making a glossary with wordpress
- How can I process all requests for a given directory in a URL with my plugin?
- How to get the real address from a url (permalink)
- WP Job Manger change jobs url (NOT slug)
- How to change all the urls of the WordPress site?
- Trying to Find the PHP File/Function that Handles a Specific Form Action URL
- Adding a script & php to functions.php
- How to create a custom wordpress plugin for a specific functionality?
- Override the plugin class and function
- Activate and deactivate two plugins automatically at certain hours
- PHP Creating a formula from mysql db values and db stored math operator
- Filter custom post type returned from REST api
- Create WordPress category dynamically
- How to Allow Users to Select Recipients In a WordPress Comment section?
- How to Add Extra Text In WordPress Title Before Post Publish
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- How often should I execute add_filter and function declaration in Code Snippets?
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- How to disable plugin capability : “create new category”
- How to rewrite URL using .htaccess in WordPress Plugin
- Links not opening as they should. Custom WP plugin
- filter just a portion of plugin function
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Gravity Forms and Gravity View Permissions
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Wrong block appender button showing
- Option value not getting updated until page refresh in WordPress
- Make plugin admin page visible to other roles
- Select posts from list and add them in a new list
- Custom post type with custom taxonomies structure url not working archive of CPT
- Product customizing quiz – quiz adding products to the cart
- WordPress Convert queries to slashes using function.php
- jet engine listing for every single taxonomy in post type [closed]
- How to export post tags from wordpress
- Sort posts by Date (DESC) and by ACF: active_inactive (ASC)
- Show WooCommerce products based on query parameters on redirect
- Failed to update a post when I add a taxonomy to it
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to access the page without registering in wordpress
- wp_enqueue_script doesn’t load JS in plugin
- Is it possible to use a post name in a custom post slug?
- CPT template is not being automatically used single post pages
- How to make content as required in custom post type?
- Set the title of a custom post automatically by using info from custom fields?
- Rewrite rule taxonomy url with different values in one function
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- public custom posts not showing in my wordpress plugin
- plugin translation *.mo file not getting loaded for custom post
- Run a function only once when logging into dashboard
- How to provide page_template path in custom plugin using WordPress
- Create CPT on Ajax Call
- Event Made Easy – Block registration to two or more events that have the same category
- I want to allow certain file types on dokan upload files
- stop resize button for wordpress media
- Mixed results with is_page() WordPress function, when using $this, or self
- Redirect OLD/Path to NEWURL/Path
- Read page- or post-content across different builder-plugins
- Remove posts that start with similar words (like a delete duplicate posts plugin)
- How to Handle? vp_page Parameter in WordPress and Resolve Google Search Console Validation Issues?
- How to add CPT in Elementor pro search template
- Unable to register rewrite rule using add_rewrite_rule
- how to compare date meta value in jet smart filter Date query?
- Help with coding a link for a button in WordPress with The Events Calendar Plugin
- Secure way to add JS Script to WordPress filesystem
- How to use Rewrite Tag Parameters in URL-rewritten Page’s Titles (META & H1)?
- My site has only one page, and users access my uploaded mp3 files from there – can I analyze access by song title?
- add to cart linking to add to cart page
- Tickera missing attendees – No attendees found
- How to call a logging function from a generic utility plugin from another plguin
- Include theme header and footer in custom plugin
- How to Change Default RSS Feed URL in WordPress Website?
- How to fetch WordPress Gallery Images to a Custom Post Type?
- Add 2 links in between the navigation using the Breadcrumb Navxt plugin hook
- CPU Overloading due to some hooks