Add custom content to the Request Block

Hi, I am familiar with using PHP snippets to edit the Listings block… For example, to add custom content to the Listings Block I can with the following snippet:

add_filter(
	'hivepress/v1/templates/listing_view_block',
	function( $template ) {
		return hivepress()->helper->merge_trees($template, [
			'blocks' => [
				'listing_container' => [
					'blocks' => [
						'custom_content_unique_name' => [
							'type' => 'content',
							'content' => '<h1>test</h1>',
							'_order' => 15,
						]
					]
				]
			]
		]);

		return $template;
	},
	1000
);

However, I am trying to do a similar thing for the view Requests block - but I cannot find anywhere a reference to this template block. What is the correct snippet to use?

Thanks,

Hi,

Please try using the same PHP snippet, but replace all the words listing with request (e.g. hivepress/v1/templates/listing_view_block > hivepress/v1/templates/request_view_block).

1 Like