Hi Team,
Is there a shortcode I can use to add the verified mark next to the user’s name here?
The user has been marked as verified already, we just need the green tick to show after the name
Hi Team,
Is there a shortcode I can use to add the verified mark next to the user’s name here?
The user has been marked as verified already, we just need the green tick to show after the name
Please try this PHP snippet but please note that it can require customization. If you are not familiar with the code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY
add_filter(
'hivepress/v1/templates/user_view_block/blocks',
function($blocks, $template){
$user = $template->get_context('user');
if(!$user){
return $blocks;
}
$is_verified = get_post_meta($user->get_id(), 'hp_user_verified', true);
if($is_verified){
return $blocks;
}
return hivepress()->template->merge_blocks(
$blocks,
[
'user_content' => [
'blocks' => [
'custom_user_verified_badge' => [
'type' => 'content',
'content' => '<i class="hp-user__verified-badge hp-icon fas fa-check-circle" title="Verified"></i>',
'_order' => '15',
],
],
],
]
);
},
1000,
2
);
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.