Created
February 20, 2023 20:40
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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