Hi,
I would like to add a new class to an element of Hive, in Listing Title, both on blocks and on Listing page.
I checked this ticket (Change sidebar classes) but with no success.
add_filter(
'hivepress/v1/templates/listing_view_page',
function( $template ) {
$block = hivepress()->template->fetch_block($template, 'page_content');
if(!$block){
return $template;
}
// Set new classes.
$block['listing_title']['attributes']['class'] = [ 'hp-listing__title', 'notranslate'];
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'page_container' => [
'blocks' => [
'page_content' => $block
],
],
],
]
);
},
1000
);
I changed the code and I got this but this is not workig, Iām trying to add a new class called notranslate on this element, this will be on listing view page, the title and then I would like to add on listing blocks also.
Can you check what is missing on this code please?
Regards