Add own profile tab with own content

4.33K viewsUpdates
0

Hi there,

Is it possible to create a own tab with own content and own link name in the profile view?

Would be awesome 🙂

Something like this:

function add_profile_tab($menus){
    $slug = 'details';
    $content = anyfunction();
    $menus[] = array( 'slug' => $slug, 'title' => 'Any title', 'content' => $content, 'order' => 4, 'public' => false);
    return $menus;
}
add_filter('ap_user_menu', 'add_profile_tab');
0

Yes you can, simply use this function in init hook:

ap_register_user_page($page_slug, $page_title, $func, $show_in_menu, $public);

What about a order? May give the current menus values like 10, 20, 30, 40… So the admin can add 10 menu items between it.

Can you add this order var? And also something for a icon. How can I add a shortcode to the content?