• ebrahim91

    (@ebrahim91)


    Hi,

    Your plugin is just awesome.I was trying to show an image avatar and username instead of the “Logout?” text. But I cant. I have tried but its working in localhost but NOT on a live site. I’ve tried with the following codes:

    function pt_login_link_to_menu ( $items, $args ) {
        if( $args->theme_location == apply_filters('login_menu_location', 'primary') ) {
    
        	if ( ! is_user_logged_in() ) {
        		$text = __( 'Login/Register', 'wp-ajax-login' );
        	} else {
        		$text =  get_avatar( get_the_author_email(), '50' ) . get_the_author(); 
        	}
            	$items .= '<li class="menu-item login-link"><a href="#pt-login">'.$text.'</a></li>';
    
        }
        return $items;
    }

    Can you please help in this regard? Please help.

  • The topic ‘Using Gravatar Image and Username instead of “Logout”?’ is closed to new replies.