Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #203284

    For whatever reason the theme was not putting an alt tag into the gravatar picture which was being used around the site. I opened up loop-about-author.php and changed a few lines to reflect:

    
    global $avia_config;
    
    	$author_id    = get_query_var( 'author' );
    	if(empty($author_id)) $author_id = get_the_author_meta('ID');
    	$alt 		  = get_the_author_meta('display_name');
    	$gravatar     = get_avatar( get_the_author_meta('email', $author_id), '75', '', $alt );
    	$name         = "<span class='author-box-name' ".avia_markup_helper(array('context' => 'author_name','echo'=>false)).">".get_the_author_meta('display_name', $author_id)."</span>";
    	$heading      = __("About",'avia_framework') ." ".$name;
    	$description  = get_the_author_meta('description', $author_id);
    

    I added the $alt and then changed $gravatar.

    If anyone has a better way than a core theme hack let me know.

    #203292

    I also had to change the image size to 81 from 75 to fully fill the gray circle background.

    #203518

    Hey!

    Afaik this is a limitation of the gravatar service and not our theme. You can use this filter code: http://ianjgough.com/blog/setting-up-the-alt-tag-for-gravatar-in-wordpress/ in the child theme functions.php file if you don’t want to modify the parent theme files.

    I’ll check if your code makes sense and maybe we’ll add it to the core files with the next version.

    Regards,
    Peter

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Gravatar Alt Tag’ is closed to new replies.