This is useful if you want to know when a user is viewing a blog post in Google Analytics vs a page. Or if you want to just have an easy way to distinguish your blog content from your other content using the URL.
There may be an easier way to do this but all of my Googling didn't turn up any answers that let you modify the post URLs only.
- Add the code from
remove-blog-front-from-custom-post-types.php
to your theme's functions.php or to a custom plugin or some file where it will get loaded. This code prevents the newblog
base from being applied to the URLs of Custom POst types and taxonomy archives. - Log into your WordPress admin
- Go to Settings -> Permalinks
- Select the Custom Structure field and add
/blog
to the Permalink structure (add this before the/%postname%
part of the URL