I've defined a custom post type in wordpress in this way:
add_action('init', 'register_cima_fellowship');
function register_cima_fellowship() {
$args = array(
'labels' => $labels,
'public' => true,
'menu_position'=>20,
'show_ui'=>true,
'show_in_menu'=>true,
'show_in_nav_menus' => true,
'rewrite' => array('slug' => 'fellow'),
'supports' => array('title', 'editor','thumbnail'),
'has_archive'=>true
);
register_post_type('cima_fellowship', $args);
}
I've created a custom archive in a file called archive-cima_fellowship.php and it works, showing all my cpt.
This cpt have a meta attribute like status, to define some of them as current and other as past. I would like to have two different archive pages, one to show only he current and another to show only the past.
For now I turn around this using a get variable in this way mysite.com/cima_fellowship/?type=past
But I would like to have cleaner url like mysite.com/fellows/past.
For this I defined 'rewrite' => array('slug' => 'fellow'), in the registration of the cpt, but I can't access the archive page trough `mysite.com/fellows, I still have to visit 'mysite.com/cima_fellowship/', and I can't find out how to "style" the URL.
Any suggestion? tutorial? guide?
Thanks in advance!