yevhen
4
- Please try this PHP snippet but please note that it can require further customization
add_filter(
'hivepress/v1/templates/vendor_view_block/blocks',
function($blocks, $template){
$vendor = $template->get_context('vendor');
if(!$vendor || !$vendor->get_categories()){
return $blocks;
}
$output = '';
foreach ( $vendor->get_categories() as $category ){
$output .= '<span>'.esc_html( $category->get_name() ).'</span>';
}
return hivepress()->helper->merge_trees(
[ 'blocks' => $blocks ],
[
'blocks' => [
'vendor_content' => [
'blocks' => [
'custom_vendor_categories' => [
'type' => 'content',
'content' => $output,
'_order' => 21,
],
],
],
],
]
)['blocks'];
},
1000,
2
);
- Please provide more details about this issue. By default location field searches by any address if there is no restriction in countries
2 Likes