I have searched, here is the closes result.
I am building a new wordpress site. I want most posts to have no category in the URL, simply www.site.com/title. However I do want the blog posts to be separate, so I'd like www.site.com/blog/title. I'd also like the option to add more like that in the future, for only specific categories, not the entire site.
There are many questions similar to this here on stackoverflow but most have 0 replies. Any advice would be great. I've even tried Advanced Permalinks without any luck.
You can simply do that by Setting > Permalinks and add to Common Setting > Custom Structure the value
/blog/%postname%/
. There you will get the blog post accessible from www.site.com/blog/title.I cannot understand the first question. By:
do you mean to NOT HAVING www.site.com/category/category-name? or not having www.site.com/category/post?
EDIT #1
To answer this:
First: you can set the Permalink to
/%postname%/
so all your post will have site/title therefore accessible from that linkSecond: You have to filter the permalink to behave differently for the posts under "Blog" category.
Try this
Third: You have to filter rewrite_rules
Go to permalink setting and save the setting to refresh your rewrite rules and make the changes above active
NOTE: Add those functions on your active theme
functions.php
templateNOTICE: I haven't test it yet but that's the way you change permalink. I did the similar way to change my permalink on archives and search result.