Just set your custom permalink structure to:
/theblog/%postname%/
If you have any custom post types used on your site, you’ll need to make sure that they don’t get the /theblog/ prepended to their URLs. To remove it, simply set with_front to false where the custom post types are registered:
'rewrite' => array('slug' => 'portfolio', 'with_front' => false),
You also need to flush the WordPress rewrite rules after making this change – just go back to Settings > Permalinks save again the permalink.
You are done.
Related Posts:
- Change the “page” slug in pagination
- Change author base slug for different roles
- Using custom/dynamic “slug” for a page
- Display posts with author in the url with custom post types
- How to seamlessly redirect between different archive and singular slugs?
- How to add dot(“.”) in post slug
- How to change default page slug?
- Handle category name URL rewrite before different post type slugs
- How to change ?lang=cn into /cn/
- custom htaccess rewrite rule for page
- Why is there /index.php/ in all my links? How do I remove it?
- Multiple Permalinks for Same Post
- Adding more pages to author pages
- Load a template page based on part of slug in wordpress
- Removing “category” from URLs then “add_endpoint()” won’t work…
- How do I change attachment slug from name to id
- Access files at new location using old file paths
- Adding special characters to slug?
- Rewrite URLs – Custom Post Type – Post Slug, Taxonamy Slug
- Preserve old website URL structure after migrating to WordPress
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- How to change custom post type slug
- Disable WordPress from changing URL slug when post is published
- Using URL rewrite to add custom URL for custom post type
- One off rewrite for single post-type slug (show normal page with same URL instead)
- Can’t use a specific custom URL (slug)?
- How to transform multiple parameter URL to clean URL
- Make the home page’s slug visible in the browser’s URL bar
- Trying to add array of paths to post permalink
- Changing the wordpress default search url to something like – …example.com/search?query=keyword
- How to add dot(“.”) in post slug
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- Change author base and slug in author link
- WordPress numeric (yearly) page names / disable yearly archives
- Post & Page with same slug
- How to add 2 variable rewrite rule?
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Remove Page Slug from URL
- Needed to change slug to access page
- Pagination posts. Url format
- Change the slug ( url ) to a sequence number starting from 0 in the custom record type?
- Switch WordPress to non-absolute links? [closed]
- Use a template file for a specific url without creating a page
- Using the Rewrite API to Construct a RESTful URL
- Adding rewrite endpoint breaks static front page
- Rewrite default post type
- add_rewrite_rule not loading correct page nor getting variables
- Add language/country code to each possible URL
- Google is indexing wordpress attachment pages
- WordPress URL rewrite regex
- WordPress Rewrite
- Removing CPT slug from URL results in 404 error for archive page
- custom template for custom url
- page is not redirecting
- Allow single quote in URLs
- How to have multiple rewrite endpoints in the same URL?
- add_rewrite_rule is not taking effect in WordPress? .htaccess file doesn’t update
- Author Profile URL
- Changing the search URL?
- Plugin action rewrite rule – non_wp_rules
- Remove Author Slug & Replace With Username
- Have two different URLs show the homepage
- Posting with slug “favicon” gets redirected
- Help with static front page blog at /blog
- Get url-friendly version of the_title?
- Rewrite ugly URL to clean URL
- Url rewrite on index.php?term=[term_name]
- Translate custom post type and taxonomy slug in URL?
- Rewrite: WordPress URL rewrite on Search
- How can I change the permalink of a translated home page?
- Add word to permalink when custom field has a value
- Visting slug for ‘post’ post type shows 404 not archive?
- simple add_rewrite_rule added, refuses to work
- URL Rewrite and add_query_var not working
- Rewrite permalink for specific posts
- How to add custom rewrite rules and point to specific templates
- ow to change cutsom page url of wordpress site using htaccess
- Show Mysql table elements as pages in WordPress
- WP in subfolder hidden by htaccess, but media links show the subfolder
- Import images from self-hosted to WordPress.com
- modify URL with mod_rewrite or hook
- Rewrite rule that wp-login.php?action=register is left alone
- add_rewrite_rule refuses to function
- How to add Search URL parameters to a Page Template Page for Custom Post Type
- Passing a variable to hyperlink text?
- WordPress Rewrite Rule to EITHER Match 1 or 2 Taxonomies when adding to URL
- Display categorised url
- Blog List Page 404 With Custom Post Type Rewriting to Blog Parent
- Custom URL segment parameters for posts
- Worpress url parse
- rewrite rules social share links
- add_rewrite_rule is not fired
- URLs ending with number higher than 2147483647 redirects to to domain.com/2147483647
- URL rewrite results in a 404, but everything should work!
- Custom URL scheme – paramters on custom post type
- URL Redirect in WordPress
- Rewrite function
- WordPress total posts per page changed and now 404 Http error comes out [closed]
- How to exclude my home page from url of my internal pages?
- Rewrite and replace url wp-admin/edit.php and wp-admin/post-new.php