Hi,
The vendor description text box is currently displayed only in vendor’s page. How to display it also in item details page?
Thank you!
Hi,
The vendor description text box is currently displayed only in vendor’s page. How to display it also in item details page?
Thank you!
Please try this PHP snippet
add_filter(
'hivepress/v1/templates/vendor_view_block/blocks',
function( $blocks, $template ) {
$vendor = $template->get_context('vendor');
if($vendor && $vendor->get_description()){
$blocks = hivepress()->helper->merge_trees(
[ 'blocks' => $blocks ],
[
'blocks' => [
'vendor_content' => [
'blocks' => [
'vendor_description' => [
'type' => 'content',
'content' => $vendor->display_description(),
'_order' => 50,
],
],
],
],
]
)['blocks'];
}
return $blocks;
},
1000,
2
);
You guys are amazing! Thank you very much!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.