Everything is in the title, can we modify the profile drop-down list?
If the answer is no, can we add a widget to the profile linking to the seller’s ads page?
I had started a button but I can’t find the generic link to each seller.
something like this: "https://test.fr/vendor/%vendor_username% ’
<div class="wp-block-button is-style-outline" style="text-align:center"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://test.fr/vendor/%vendor_username%" style="border-radius:20px;background-color:#ff005582" rel="noreferrer noopener">Mes annonces</a></div>
this might help you
functions.php
<?php
add_filter(
'hivepress/v1/menus/user_account',
function( $menu ) {
$menu['items']['custom_name_here'] = [
'label' => 'custom label here',
'url' => 'custom url here',
'_order' => 123,
];
This file has been truncated. show original
If you want to update the text or change it, you can also do it:
1 Like
Thank you for the snippets, that’s actually what I was looking for, however there remains a question how to add the seller’s personal ads page ?
Oh sry i found this
add_filter(
'hivepress/v1/menus/user_account',
function ( $menu ) {
if ( is_user_logged_in() ) {
$vendor_id = HivePress\Models\Vendor::query()->filter(
[
'user' => get_current_user_id(),
]
)->get_first_id();
if ( $vendor_id ) {
$menu['items']['vendor_view'] = [
'label' => 'Vendor Profile',
'url' => hivepress()->router->get_url( 'vendor_view_page', [ 'vendor_id' => $vendor_id ] ),
'_order' => 123,
];
}
}
return $menu;
},
1000
);
2 Likes
This is valuable, but, how can a Vendor edit their own profile?
Sorry I hate to hijack but I am looking for the same setup.
system
Closed
April 28, 2024, 3:40pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.