How to make specific listing view only?

Please try this PHP snippet instead, it adds a unique ID to each listing block:

add_filter(
	'hivepress/v1/templates/listing_view_block/blocks',
	function ( $blocks, $template ) {
		$listing = $template->get_context( 'listing' );

		if ( $listing ) {
			$blocks = hivepress()->template->merge_blocks(
				$blocks,
				[
					'listing_container' => [
						'attributes' => [
							'id' => 'listing-' . $listing->get_id(),
						],
					],
				]
			);
		}

		return $blocks;
	},
	1000,
	2
);

Then you can use a similar CSS snippet as suggested for the listing page previously, e.g. to block the whole listing (replace 123 with the listing ID):

#listing-123{pointer-events:none}

Or just the listing actions:

#listing-123 .hp-listing__actions {pointer-events:none}

2 Likes