Skip to content

Instantly share code, notes, and snippets.

@hivepress
Created February 20, 2023 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hivepress/7edd0ac61828a052e1bcb9317bae843c to your computer and use it in GitHub Desktop.
Save hivepress/7edd0ac61828a052e1bcb9317bae843c to your computer and use it in GitHub Desktop.
Show the listing image instead of the vendor image for listings #hivepress #experthive
<?php
add_filter(
'hivepress/v1/templates/listing_view_block/blocks',
function( $blocks ) {
return hivepress()->helper->merge_trees(
[ 'blocks' => $blocks ],
[
'blocks' => [
'listing_image' => [
'path' => 'listing/view/block/listing-image',
],
],
]
)['blocks'];
},
1000
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment