Hello, in the services page I have the vendor’s name displayed before the category name in each listing. Can I have the same setup in the listing’s individual page? Currently, it only shows the category name.
Hi,
Yes, it is possible, but it will require a custom implementation. If you are familiar with coding or have a developer, we can provide you with general guidance. Alternatively, you can leave it as it is, as the vendor block is displayed intact in the sidebar on the listing page.
Hi Andrii, thanks for your reply! yes, if you can guide me would be great.
Please try this code snippet:
add_filter(
'hivepress/v1/templates/listing_view_page/blocks',
function( $blocks ) {
return hivepress()->helper->merge_trees(
[ 'blocks' => $blocks ],
[
'blocks' => [
'listing_details_primary' => [
'blocks' => [
'listing_vendor_link' => [
'type' => 'part',
'path' => 'listing/view/block/listing-vendor',
'_order' => 5,
],
],
],
],
]
)['blocks'];
},
1000
);
Hi Ihor, the code worked well. Gracias!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.