Load different content to the user profile tab

Solved5.10K viewsFeature request
1

I use userpro for managing user. I dont want to have two pages, where the user can edit his account.

Therefore I want to load the userpro account editing content (via [userpro]) into the “profile” tab in anspress.

How can I do that? Is there a filter for that?

0

You can simply override user/profile.php and add :

echo do_shortcode('[userpro]');

That’s it. Cheers.

And how can I keep it updated safe?

0

Use this hook:

function mycustom_user_menu($menus){
    $link = 'YOUR_USERPRO_LINK_FUNCTION' //replace this
    $menus['profile'] = array( 'slug' => 'profile', 'title' => 'Directory details', 'link' => $link, 'order' => 4, 'public' => false);
    return $menus;
}
add_filter('ap_user_menu', 'mycustom_user_menu');

What will this hook do?

Can I anyhow overwrite the content in anspress-question-answer/theme/default/user/profile.php?

Yes, that what I asked to do. simply copy this file to your theme like: MY_ACTIVE_THEME/anspress/user/profile.php