# Show the listing image instead of the vendor image

**URL:** <https://community.hivepress.io/t/show-the-listing-image-instead-of-the-vendor-image/3429>\
**Category:** ExpertHive\
**Tags:** experthive\
**Created:** [December 16, 2022, 11:17pm UTC](https://community.hivepress.io/t/show-the-listing-image-instead-of-the-vendor-image/3429 "2022-12-16T23:17:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Userrandom2778](https://community.hivepress.io/letter_avatar_proxy/v4/letter/u/919ad9/32.png) [@Userrandom2778](https://community.hivepress.io/u/Userrandom2778)\
**Post date:** [December 16, 2022, 11:17pm UTC](https://community.hivepress.io/t/show-the-listing-image-instead-of-the-vendor-image/3429/1 "2022-12-16T23:17:27Z")

</div>

![Screenshot 2022-12-16 032742](https://community.hivepress.io/uploads/default/original/2X/9/9c43fab3e2c5308041820eda1808945eceeeae91.jpeg)  
 ![Screenshot 2022-12-16 032817](https://community.hivepress.io/uploads/default/original/2X/6/65613750a603efd020578e0df416e8f5261607f9.jpeg)

---

<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:** [December 17, 2022, 12:23pm UTC](https://community.hivepress.io/t/show-the-listing-image-instead-of-the-vendor-image/3429/3 "2022-12-17T12:23:38Z")

</div>

Hi,  
Please try this PHP snippet ([How to add custom code snippets - HivePress Help Center](https://help.hivepress.io/article/23-how-to-add-custom-code-snippets)):

```auto
add_filter(
	'hivepress/v1/templates/listing_view_block/blocks',
	function( $blocks, $template ) {
		return hivepress()->helper->merge_trees(
			['blocks' => $blocks],
			[
				'blocks' => [
					'listing_image' => [
						'path' => 'listing/view/block/listing-image',
					],
				],
			]
		)['blocks'];
	},
	1000,
	2
);

```

---

<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:** [January 16, 2023, 12:23pm UTC](https://community.hivepress.io/t/show-the-listing-image-instead-of-the-vendor-image/3429/4 "2023-01-16T12:23:47Z")

</div>

Closed on January 16, 2023, 12:23pm UTC

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