Integration of listings in vendor block

Hi, I’m trying to integrate the listing for vendors in the vendor block.
This is what I’ve accomplished since now:

What I need:

add_filter(
	'hivepress/v1/templates/vendor_view_block',
	function ($template) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'vendor_container' => [
						'blocks' => [
							'listings_container' => [
								'type'   => 'results',
								'_order' => 20,

								'blocks' => [
									'listings'           => [
										'type'      => 'listings',
										'columns'   => 2,
										'_label'    => true,
										'_settings' => ['columns'],
										'_order'    => 10,
									],
								],
							],
						],
					],
				]
			]
		);
	}
);

But all I can have is the “no results” message.
How can I have the listings inside the box?

Please try this PHP snippet

add_filter(
	'hivepress/v1/templates/vendor_view_block',
	function ($template) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'vendor_container' => [
						'blocks' => [
							'listings_container' => [
								'type'   => 'container',
								'_order' => 20,

								'blocks' => [
									'listings'           => [
										'type'      => 'listings',
										'columns'   => 2,
										'_order'    => 10,
									],
								],
							],
						],
					],
				]
			]
		);
	}
);

@yevhen
Thank you for your answer, the snippet you’ve provided isn’t good, I need to list only the 3 last listings for the vendor… Is it possible for you to develop it as a payed extension or something like that? We need it…

Sorry, we temporarily don’t offer customization services, but if you hire someone via Upwork/Fiverr (any developer with WordPress experience) I can provide some guidance on the implementation.

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