Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • vanoccupanther1

    (@vanoccupanther1)

    Well, I gave it a whirl and I couldn’t get it to work. Here’s my code:
    In functions.php

    function get_the_avatars_with_link_to_authors(){
    	$authors = get_users_of_blog();
    		foreach ($authors as $author){
    			$author_data = get_userdata($author->user_id);
    			$author_nicename = $author_data->user_nicename;
    			$author_displayname = $author_data->display_name;
    			$link .= '<li style="list-style-type:none;list-style-position: outside"><a style="text-decoration:none;" href="' . get_author_posts_url($author_data->ID) . '" title="' . sprintf( __( "View %s's profile" ), $author_displayname ) . '">' . get_avatar($author_data->ID,$size = '35') . $author_displayname . '</a></li>';
    		}
    	return $link;
    }

    and in my sidebar I have:

    <?php printf( __( '%s', 'libra' ), get_the_avatars_with_link_to_authors() ) ?>
    vanoccupanther1

    (@vanoccupanther1)

    Thanks esml – I’ll give that a try and let you know how I get on 😉

    vanoccupanther1

    (@vanoccupanther1)

    Hi guys!

    @ astracan I got this to work perfect but do you know how I can hide the administrator’s avatar/link from showing in the sidebar? I only need to show authors and not the admin.
    Cheers! 🙂

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