How can i modify this page ? I know that the page-header.php in the rentalhive theme is use for the category header, but i don’t know how to apply it on the region page.
I know that with this snippet, i can change the title :
This would require code customizations, please try adding custom content to the header section via the hivetheme/v1/areas/site_hero filter hook. You can check is_tax('hp_listing_region') and output custom HTML with the title and description. Here’s a sample function from the default ListingHive theme listinghive/includes/components/class-theme.php at master · hivepress/listinghive · GitHub
Thanks for sharing! You can try removing the title via the CSS snippet suggested above, or using PHP via the hivepress/v1/templates/listings_view_page filter hook, checking the is_tax('hp_listing_region') condition.
If i try this code, i can disable the title, but not for description :
add_filter(
'hivepress/v1/templates/page',
function( $args ) {
if ( is_tax( 'hp_listing_region' ) ) {
// Supprime le titre de la page
unset( $args['context']['page_title'] );
// Supprime le bloc de description de la page (le bon tableau ici est "blocks")
unset( $args['blocks']['term_description'] );
}
return $args;
},
1000
);
In your second PHP snippet, we recommend replacing unset( $args['blocks']['term_description'] ); with unset( $args['context']['page_description'] );. And check if everything is working correctly.