How to create a permalink structure which finish by:
/category-name/post-name/
Instead of:
/category-slug/post-name/
By default, Wordpress is offering %category%
tag strucure as "A sanitized version of the category name (category slug field on New/Edit Category panel".
How can I use the category name instead of category slug in permalinks?
Note that I dont need the easiest solution of making my slugs equal to my categories names. In fact, customer need to see in the area of edit post : the categories in a specific non-alpahbetical order. So I managed to do this by giving a digital number for the category as a slug and order showing categories by slug in an ASC mode using:
add_filter( 'get_terms_args', 'wpse_53094_sort_get_terms_args', 10, 2 );
function wpse_53094_sort_get_terms_args( $args, $taxonomies )
{
global $pagenow;
if( !is_admin() || ('post.php' != $pagenow && 'post-new.php' != $pagenow) )
return $args;
$args['orderby'] = 'slug';
$args['order'] = 'ASC';
return $args;
}
I think If I dont manage to use t f
solution, I will look for a code or a plugin that adds meta field for categories and order by this field in ASC mode. Then I will rename my slugs to the same name of categories. What do you think about this approach?
Thank you for your comment