• Resolved costino80

    (@costino80)


    Hello, I love this plugin.

    But is there a way to remove / hide Gravatar from the user profile page when SLA is activated ?

    Right now there are the two options and it’s very confusing for the users.

    I checked the box “Local Avatar Only” but Gravatar is still visible in the user profile page…

    Thanks for you help

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Faisal Alvi

    (@faisal03)

    Hello @costino80,

    Thank you for getting in touch with us. Unfortunately, SLA does not have the option to disable the text you see for Gravatar, as it is outside the scope for now. However, we do have a couple of solutions that you may find helpful.

    1. Firstly, you can use the “Disable User Gravatar” plugin.
    2. Alternatively, you can use the user_profile_picture_description filter hook to filter the profile page description. You can use the following snippet to hide the description:
    add_filter( 'user_profile_picture_description', function ( $description = '', $profileuser = null ) {
        if ( IS_PROFILE_PAGE ) {
            $description = '';
        }
    
        return $description;
    }


    I hope that helps! Please let me know if you have any further questions or concerns.

    Thread Starter costino80

    (@costino80)

    Hello, thank you for your answer and the good idea.

    Finally, I added a code that hides via css the Gravatar block.

    Here is the code you can use :

    add_action( 'admin_head', 'hide_user_profile_picture' );
    function hide_user_profile_picture() {
        global $pagenow;
        if ( $pagenow === 'profile.php' ) {
            echo '<style>
                .user-profile-picture {
                    display: none;
                }
            </style>';
        }
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide Gravatar from the profile page ?’ is closed to new replies.