Hide map from search listing view

What is the the difference between this 2 codes. I cant find the difference to acheive my goal:

add_filter(
	'hivepress/v1/templates/listings_view_page',
	function( $template ) {
		hivepress()->template->fetch_block( $template, 'listing_map' );

		return $template;
	},
	1000
);
add_filter(
	'hivepress/v1/templates/listings_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'listing_map' => [
						'type' => 'content',
					],
				],
			]
		);
	}
);

Hi,

These snippets hide the map on the listings page — they are simply two different approaches that achieve the same result.

Could you please share a bit more detail about what you’re trying to accomplish? We’ll do our best to help.

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