Actually, this isn’t working. I must be missing something simple somewhere.
I am using:
/**
* Change listing post type labels
*/
add_filter( 'wpsight_post_type_labels_listing', 'my_post_type_labels_listing' );
function my_post_type_labels_listing( $labels ) {
// Set post type labels
$labels = array(
'name' => _x( 'Propiedades', 'propiedades', 'wpcasa' ),
'singular_name' => _x( 'Propiedad', 'propiedad', 'wpcasa' ),
'add_new' => _x( 'Agregar Nueva', 'propiedad', 'wpcasa' ),
'add_new_item' => _x( 'Agregar Nueva Propiedad', 'propiedad', 'wpcasa' ),
'edit_item' => _x( 'Editar Propiedad', 'propiedad', 'wpcasa' ),
'new_item' => _x( 'Nueva Propiedad', 'propiedad', 'wpcasa' ),
'view_item' => _x( 'Ver Propiedad', 'propiedad', 'wpcasa' ),
'search_items' => _x( 'Buscar Propiedades', 'propiedades', 'wpcasa' ),
'not_found' => _x( 'No se encontraron propiedades', 'propiedades', 'wpcasa' ),
'not_found_in_trash' => _x( 'No se encontraron propiedades en el basurero', 'propiedades', 'wpcasa' ),
'menu_name' => _x( 'Propiedades', 'propiedades', 'wpcasa' ),
);
return $labels;
}
I can see labels changing so I am sure the code is working, but this is having no impact on the actual post type name (the url). So all properties are being listed under:
https://mywebsite.com/listing/property-name
I am hoping to change “listing” in the url for something different like:
https://mywebsite.com/propiedades/property-name
Hopefully that makes sense.
Thanks!