Custom Tab for the logged in user
-
I was doing this on buddy press using
bp_is_my_profile()
but I changed my site to Ultimate member because of some cpu issues.I#m trying to add an upload form using custom profile tab functions given in your docs.
function um_profile_upload_tab_my_profile_only() {
$user_id = um_profile_id();
if ( is_user_logged_in() && um_fetch_user( $user_id ) ) {
add_action( 'um_profile_content_upload_tab_default', 'um_profile_content_upload_tab_default' );
add_filter( 'um_profile_tabs', 'um_upload_tab_add_tab', 1000 );
}
}
add_action('init', 'um_profile_upload_tab_my_profile_only');This code does not show me the tab but when I use only
is_user_logged_in()
I get my custom tab on all profiles but I want to make it visible only as a part of my profile if I’m logged in.
- The topic ‘Custom Tab for the logged in user’ is closed to new replies.