Tengo una categoría en mi sitio web llamada "perfiles". Estoy en el proceso de mover esta categoría a un tipo de publicación personalizado llamado "perfiles".
Mi problema es que no puedo obtener la página de archivo para mostrar este tipo de publicación personalizada. Cuando voy a la url mywebsite.com/profiles
, me lleva a una página de publicación única para una publicación en la categoría de perfiles.
He incluido has_archive = true;
en mi functions.php
No tuve problemas para crear una página de archivo para otro tipo de publicación personalizada que realicé en el mismo sitio web, así que realmente no sé por qué esto no funciona esta vez.
¿Algún consejo sería el más apreciado?
add_action( 'init', 'profile_custom_init' );
/* Here's how to create your customized labels */
function profile_custom_init() {
$labels = array(
'name' => _x( 'Profiles', 'post type general name' ), // Tip: _x('') is used for localization
'singular_name' => _x( 'Profile', 'post type singular name' ),
'add_new' => _x( 'Add New', 'Profile' ),
'add_new_item' => __( 'Add Profile' ),
'edit_item' => __( 'Edit Profile' ),
'new_item' => __( 'New Profile' ),
'view_item' => __( 'View Profile' ),
'search_items' => __( 'Search Profile' ),
'not_found' => __( 'No Profile found' ),
'not_found_in_trash' => __( 'No Profile found in Trash' ),
'parent_item_colon' => ''
);
// Create an array for the $args
$args = array( 'labels' => $labels, /* NOTICE: the $labels variable is used here... */
'public' => true,
'publicly_queryable' => true,
'has_archive' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 10,
'supports' => array( 'title', 'editor','thumbnail', 'excerpt', 'custom-fields' ),
'taxonomies' => array('category')
);
register_post_type( 'profile', $args ); /* Register it and move on */
}