I have a Wordpress site that has been up and running for some years using the custom permalink structure of: /%postname%/
This is fine, except I want to launch a special section in which posts go in a directory, for example: /special/%postname%/
What's the proper way to go about this? A custom post type would work, but honestly the template and post type is just an article.
I think there is a way to do this with a rewrite, something like
function append_query_string( $url, $post, $leavename=false ) {
if ( $category->term_id == 'special' ) {
$url = add_query_arg( 'special', $url );
}
return $url;
}
add_filter( 'post_link', 'append_query_string', 10, 3 );
but I'm just starting and could use some pointers. Thanks!