Margarida Barreto

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
in reply to: Remove “edit profile” from user dashboard #173673

Margarida Barreto
Participant

Perfect!! Works just fine 🙂
Thank you so much!

in reply to: Remove “edit profile” from user dashboard #173667

Margarida Barreto
Participant

Hi,
i add this code in the functions.php file:

add_filter(‘wpdm_user_dashboard_menu’,’my_custom_dashboard_menus’,10,1);
// $menu_items is an array containing current menu items
function my_custom_dashboard_menus($menu_items){
// Removing edit profile menu
unset($menu_items[‘edit-profile’]);

}

however all the user area disappeared. I only want that people cannot have access to the “Edit Profile” to change their name or password but still see their downloads. Is it possible? Thanks

in reply to: Remove “edit profile” from user dashboard #173229

Margarida Barreto
Participant

Hi there, i saw this info: <?php
add_filter(‘wpdm_user_dashboard_menu’,’my_custom_dashboard_menus’,10,1);
// $menu_items is an array containing current menu items
function my_custom_dashboard_menus($menu_items){
// Removing edit profile menu
unset($menu_items[‘edit-profile’]);
//Adding new menu item using callback function
$menu_items[‘new-menu-id-1’] = array(‘name’► __(‘Menu Title’,’text-domain’), ‘callback’ ► ‘CallbackFunction’);
//Adding new menu item using short-code
$menu_items[‘new-menu-id-2’] = array(‘name’► __(‘Menu Title’,’text-domain’), ‘shortcode’ ► ‘[short_code_here]’);
return $menu_items;
}
?>

It was in : https://www.wpdownloadmanager.com/doc/filter-reference/wpdm_user_dashboard_menu/

But i dont know what to do with it.

Thanks in advance

Viewing 3 posts - 1 through 3 (of 3 total)