Request button on vendor profile page

I have added an extra button to the vendor dashboard page using this code:

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

BUT I want to change it so it’s a button to the available requests page, how can I change it? Whatever I try it just removes the button. Is it also possible to only show requests that match the vendors profile settings?

Hey @Larraine,

You can add a simple button using a snippet like this:

<a href="/account/vendor/requests" class="button">
  View Requests
</a>

I don’t personally use ‘requests’, so you might need to slightly adjust the URL address. But, if you visit the requests page you mean on your own site, it’ll be that URL you want to point to.

If the URL has numbers or a username, it gets a bit more complicated.

I hope this helps!

Cheers,
Chris :victory_hand:

1 Like

Yes, changing the block to:

'vendor_requests_link' => [
	'type'   => 'content',
	'content'   => 'button HTML code here',
	'_order' => 10,
],

With the sample HTML code suggested above should do the trick.

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