I would like to add custom links here. As every of my vendor is having a “personal link” to their classes, I would like to know if there is a way to achieve this please?
Thanks in advance
Thank you very much but this just adds a link to the profile, right ? How does it work if I want a different link per vendor ? I mean each vendor has access to a “meeting” page. I would like to have a way to display the link automatically, I mean the right meeting link for the right vendor.
Hope it’s clear enough…
Thanks in advance and best regards,
As a workaround, it is possible to create the vendor attribute which vendors can not edit in their front-end accounts. So it is possible to add a meeting link to each vendor account from the back-end where you have access as administrator. For example, if you create a vendor attribute with the field name meeting_link
then please try this PHP snippet
add_filter(
'hivepress/v1/menus/user_account',
function( $menu ) {
$vendor = \HivePress\Models\Vendor::query()->filter(['user' => get_current_user_id()])->get_first();
if($vendor && $vendor->get_meeting_link()){
$menu['items']['custom_name_here'] = [
'label' => 'Meeting link',
'url' => esc_url($vendor->get_meeting_link()),
'_order' => 123,
];
}
return $menu;
}
);
Amazing. It’s a great workaround already. Thank you, you are a super team.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.