# Move 'view vendor' from listing footer to secondary attributes

**URL:** <https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924>\
**Category:** HivePress\
**Created:** [October 22, 2023, 4:06pm UTC](https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924 "2023-10-22T16:06:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nureqmal](https://community.hivepress.io/user_avatar/community.hivepress.io/nureqmal/32/4363_2.png) [@nureqmal](https://community.hivepress.io/u/nureqmal)\
**Post date:** [October 22, 2023, 4:06pm UTC](https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924/1 "2023-10-22T16:06:19Z")

</div>

How to move the ‘view vendor’ from listing footer to attributes sections in the listing block?

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [October 23, 2023, 5:40am UTC](https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924/2 "2023-10-23T05:40:29Z")

</div>

Hi,

Unfortunately, there’s no such feature, it would require a custom implementation. If customizations are required for your site, please try customizing it using the collection of code snippets [Search · user:hivepress · GitHub](https://gist.github.com/search?q=user%3Ahivepress) and other developer resources, or consider hiring someone for custom work [https://fvrr.co/32e7LvY](https://fvrr.co/32e7LvY)

---

<div class="post-metadata">

**Author:** ![nureqmal](https://community.hivepress.io/user_avatar/community.hivepress.io/nureqmal/32/4363_2.png) [@nureqmal](https://community.hivepress.io/u/nureqmal)\
**Post date:** [October 23, 2023, 8:47am UTC](https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924/3 "2023-10-23T08:47:12Z")

</div>

I use this php but it goes to the primary block. Where is the mistake?

```auto
add_filter(
	'hivepress/v1/templates/listing_view_block/blocks',
	function ($blocks, $template){
		$listing = $template->get_context('listing');
		
		if(!$listing){
			return $blocks;
		}
		
		$vendor_id = $listing->get_vendor__id();
		
		if(!$vendor_id){
			return $blocks;
		}
		
		return hivepress()->helper->merge_trees(
					['blocks' => $blocks],
					[
						'blocks' => [
							'listing_actions_primary' => [
								'blocks' => [
									'listing_vendor_link' => [
										'type' => 'content',
										'content' => '<a href="'.esc_url( hivepress()->router->get_url( 'vendor_view_page', ['vendor_id' => $vendor_id] ) ).'"><p><strong>'.esc_html($listing->get_vendor__name()).'</strong></p></a>',
										'_order' => 50,
									],
								],
							],
						],
				]
				)['blocks'];
	},
	1000,
	2
);

```

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [October 24, 2023, 5:34am UTC](https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924/4 "2023-10-24T05:34:21Z")

</div>

Hi,

Sorry for the inconvenience, but customization is beyond our support scope - it includes fixing bugs and guidance about the available features [Support Policy | HivePress](https://hivepress.io/support-policy/)

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [November 23, 2023, 5:35am UTC](https://community.hivepress.io/t/move-view-vendor-from-listing-footer-to-secondary-attributes/7924/5 "2023-11-23T05:35:16Z")

</div>

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