EDIT: Resolved: In 3.1 you need to include another parameter in order to enable the archive option (it is "false" by default)
'has_archive' => true,
Then refresh the rewrite (wp-admin - options - permalinks) and push the "save" button and voilá.
Hope this help someone.
It doesn't work in 3.1 for me either.
- an archive.php file
- an archive-producto.php (that is, for the "producto" custom post type)
The custom post type is registered like this:
$argproducto = array(
'labels' => $lproducto,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => array('slug' => 'productos'),
'capability_type' => 'page',
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','editor','custom-fields','thumbnail','excerpt','page-attributes')
Where $lproducto are the labels.
Notice there the rewrite is "productos"
If I go to the site:
It doesn't work. But, if I try:
It calls the index.php, not archive.php
Yes, I tried to refresh the permalinks and nothing. Also tried to change the way that I was registering the custom post type (changing the hierarchical to false and making it post like) and didn't work either.
EDIT: BTW, This was a 3.0.5 version, I passed it to 3.1 via the automatic update.