1

I have Wordpress installed on the root of my website. It is using a static homepage and posts page. As it stands, each post will look like this example.com/blogpostname.

I don't want to use category workaround where you set the default post's category to blog, it seems more like a workaround than a solution.

Thanks.

1 Answer 1

2

In admin under Settings > Permalinks, select Custom Structure and enter /blog/%postname%/.

This will prepend /blog/ to categories and tags by default, and any custom post types and taxonomies where you have not registered them with the with_front argument set to false. you can remove it from the built-in category and tag taxonomies by setting category base and tag base (also under Settings > Permalinks) to category and tag, respectively (or whatever you want your bases to be). The end result will be that only posts will contain the blog prefix.

2
  • Won't that be site-wide though, not only on blog posts?
    – Jack
    Commented Jan 11, 2014 at 2:32
  • it will be prepended to categories and tags by default, and any custom post types and taxonomies where you have not registered them with the with_front argument set to false. you can remove it from the built-in category and tag taxonomies by setting category base and tag base (also under Settings > permalinks) to category and tag, respectively (or whatever you want your bases to be). the end result will be that only posts will contain the blog prefix.
    – Milo
    Commented Jan 11, 2014 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.