Support » Plugin: UsersWP - Social Login » How to change Social Login Images for Twitter, Facebook, Google

  • Resolved rajeevrf

    (@rajeevrf)


    Hi,

    I would like to change the Social Login Icon because for Twitter it’s showing small Font Awesome Icon and for Google, it’s showing a big image. It would be better if everything is of the same kind. Either all icons to be images or all to be Font Awesome icons.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Patrik

    (@wpdev10)

    Hi,

    The google button is currently different as they specifically asked us to change it according to their policy. If you want to change it then you can do it by using the filter we have provided. Try following code in your functions.php file of currently active theme or via Code Snippet plugin and let me know if it helps or not:

    add_filter("uwp_social_login_button_html","change_uwp_social_login_button_html",10,3);
    function change_uwp_social_login_button_html($btn_output,$provider,$url){
    	if($provider=='google' && function_exists('aui') ){
    		$social_name_class = $provider;
    		$social_icon_class = "fab fa-google";
    		 $btn_output =  aui()->button( array(
    			                'href'  => $url,
    			                'class'     => 'ml-1 mb-1 border-0 btn  btn-'. $social_name_class.' btn-sm btn-circle',
    			                'content' => '<i class="'. $social_icon_class.'  fa-fw fa-lg"></i>',
    			                'data-toggle' => 'tooltip',
    			                'title' => ucfirst($provider),
    		                ) );
    	}
    	
    	return $btn_output;
    }

    Regards,
    Patrik

    Thread Starter rajeevrf

    (@rajeevrf)

    That did the trick. Thanks for the quick trick. 🙂

    the code above didn’t worked for me
    would you please advice
    how to change the google button to match my them or to change the facebook button to match the google one
    thanks

    Plugin Support Patrik

    (@wpdev10)

    @rafahghany

    I would suggest you create a new ticket and provide a site URL where we can see the buttons and we will reply with the solution.

    Regards,
    Patrik

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.