Custom block on single listing view page

Hello,

is there an easy way to add an extra shortcode block that comes from a third-party plugin? I mean a single listing view page and an additional shortcode block for example below the description.

Thanks in advance.

Regards

Please try this PHP snippet

add_filter(
	'hivepress/v1/templates/listing_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'page_content' => [
						'blocks' => [
							'custom_listing_shortcode' => [
								'type'    => 'content',
								'content' => do_shortcode('[your_shortcode_here]'),
								'_order' => 61,
							],
						],
					],
				],
			]
		);
	}
);
1 Like

Thanks, @yevhen. It works like a charm.

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