Show tags in block

I see tags are shown on the listing page but how can I to display them in the listing block as well?

Please try this PHP snippet but please note that it can require further customization

add_filter( 
	'hivepress/v1/templates/listing_view_block', 
	function($template){
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'listing_content' => [
						'blocks' => [
							'listing_tags' => [
								'type'   => 'listing_tags',
								'_order' => 70,
							],
						],
					],
				],
			]
		);
	},
	1000
);

Almost @yevhen. The tags show up but it just repeats the same tags for every listing.

Please try this snippet instead:

add_filter( 
	'hivepress/v1/templates/listing_view_block', 
	function($template){
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'listing_content' => [
						'blocks' => [
							'listing_tags' => [
								'type'   => 'part',
								'path' => 'listing/view/page/listing-tags',
								'_order' => 70,
							],
						],
					],
				],
			]
		);
	},
	1000
);

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