Wordpress Custom Permalink for Just Posts
You simply have to set /blog/%postname%/
as your permalinks structure, this will not change your pages permalinks.
And to keep your portfolio permalinks, you should set with_front
to false
when you register this post type.
'with_front' => bool
Should the permastruct be prepended with the front base. (example: if your permalink structure is/blog/
, then your links will be:false->/news/
,true->/blog/news/
). Defaults to true
EDIT 1 : You should probably flush Wordpress rewrite rules after that.
EDIT 2 : with_front
param is a rewrite
param :
'rewrite' => array('slug' => 'portfolio', 'with_front' => false),