How to hide Message icon

I would like to hide the message icon from all places on my site: on listings and on listing page under vendor. I only want the yellow message button to appear under the vendor card on listing page and on vendor page.
image
Screenshot 2022-09-29 3.39.20 PM

Please try this PHP snippet

add_filter( 'hivepress/v1/templates/vendor_view_block', 'hide_message_custom', 1000 );
add_filter( 'hivepress/v1/templates/listing_view_block', 'hide_message_custom', 1000 );
add_filter( 'hivepress/v1/templates/order_footer_block', 'hide_message_custom', 1000 );
add_filter( 'hivepress/v1/templates/booking_view_block', 'hide_message_custom', 1000 );
add_filter( 'hivepress/v1/templates/booking_view_page', 'hide_message_custom', 1000 );
function hide_message_custom ($template){
	if(hivepress()->get_version( 'messages' )){
		$template =  hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'message_send_link'  => [
						'type'   => 'content',
					],
				],
			]
		);
	}
	
	return $template;
}

Worked great, thank you.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.