Add a listing shortcut on vendor dashboard

HI

I have found a code snippet on another discussion on HOW TO ADD “ADD A LISTING” to the vendor dashboard. But it doesn’t seem to work.

Any assistance would be appreciated. Thank you so much.
PHP Code snippet below:

add_filter(
	'hivepress/v1/templates/listings_edit_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'page_content' => [
						'blocks' => [
							'vendor_listing_submit_link' => [
								'type'   => 'part',
								'path'   => 'listing/submit/listing-submit-link',
								'_order' => 5,
							],
						],
					],
				],
			]
		);
	},
	1000
);

Hi,

This snippet adds a button to the Account > Listings > Edit listing button. If you need to add a button to the dashboard, please try using this hook: hivepress/v1/templates/vendor_dashboard_page

HI Andrri

Thank you so much. I know that I should hire someone, but can’t right now.

Can you maybe tell me where to add the hook? I have been adding code snippets to the hivepress ccs spot and I have downloaded an extra plugin to add php etc.

Your advice would be truly appreciated.
Landi

Nevermind, I figured it out. Actually not so difficult. :wink: thank you Andrri.

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