• Resolved pixelvista

    (@pixelvista)


    I’d like to have the contacts in the profile header but only visible to two of three type logged in member roles.

    Is there is a snippet for this?

    Also how can I hide the borders below all fields in profiles?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @pixelvista

    You can try this code snippet and replace um_role_id
    with the Role ID of the Users “not visible contacts”

    add_action( 'um_after_profile_header_name_args', 'um_social_links_icons_remove', 10 );
    
    function um_social_links_icons_remove( $args ) {
    
        global $current_user;
        
        $role = UM()->roles()->get_priority_user_role( $current_user->ID );
        if ( $role == 'um_role_id' ) {
            remove_action( 'um_after_profile_header_name_args', 'um_social_links_icons', 50 );
        }
    }

    Install by adding the code snippet to your active theme’s functions.php file
    or use the “Code Snippets” Plugin

    https://wordpress.org/plugins/code-snippets/

    Plugin Support Yurii

    (@yuriinalivaiko)

    Hi @missveronicatv

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. 🙂

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hide social icons and other contact details, website, WhatsApp, mobile’ is closed to new replies.