I have to ship different pages and, on a blog section, different posts according to a country taxonomy. So a page could show up in USA and Canada and another one could show up in France and Italy depending on what countries the author has checked. Users get content associated with their country.
What I would like to have is URLs like :
I registered a custom taxonomy :
$labels = array(
'name' => 'Country'
$args = array(
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => false,
'show_ui' => true,
'hierarchical' => true,
'rewrite' => true
register_taxonomy( 'country', array('page', 'post'), $args );
I googled around and did not find much talking about how to automatically format pages slugs. I tried changing permalinks using %country% but, as I expected, it didn't do anything.
What would I have to do to rewrite pages slugs dynamically and add the value of my country taxonomy before the slug? Or am I just doing it wrong?