• Resolved lefturns190

    (@lefturns190)


    I want to increase the size of the avatars displayed with the comments. I’m a newbie and am lost. I’m using version 2.7 with the iNove theme. My blog is at https://3widealley.com/wordpressblog/?p=155

    I’ve searched the style sheets, comment sheets and others, but can’t find anything… any help pointing me in the right direction would be appreciated.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter lefturns190

    (@lefturns190)

    Searching the support blogs, I found this:

    wp_list_comments(‘type=comment&callback=custom_comments&avatar_size=64’)

    This did NOT work. That change was made to the themes comments.php file. Does that code also need to be added elswhere to work properly?

    Robert

    (@instantshift)

    use that in comments.php <?php echo get_avatar( $comment, 64 ); ?>

    Thread Starter lefturns190

    (@lefturns190)

    Instashift: I’m new at this … should I put it right above the wp_list_comments line or somewhere else? Should I use that instead of the code I changed above, or in addition?

    Thread Starter lefturns190

    (@lefturns190)

    I entered

    <?php echo get_avatar( $comment, 64 ); ?>

    After the wp_list_comments code… no change in avatar size.

    Robert

    (@instantshift)

    Try this one.

    <?php wp_list_comments(‘type=comment&avatar_size=64’); ?>

    Thread Starter lefturns190

    (@lefturns190)

    That didn’t work either. I entered it in the comments.php file for the theme…

    <!-- comments START -->
    	<ol id="thecomments">
    	<?php
    		if ($comments && count($comments) - count($trackbacks) > 0) {
    			// for WordPress 2.7 or higher
    			if (function_exists('wp_list_comments')) {
    				wp_list_comments('type=comment&callback=custom_comments&avatar_size=64');
    			// for WordPress 2.6.3 or lower
    			} else {
    				foreach ($comments as $comment) {
    					if($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') {
    						custom_comments($comment, null, null);
    					}
    				}
    			}
    		} else {
    	?>
            <?php wp_list_comments('type=comment&avatar_size=64'); ?> 
    
    		<li class="messagebox">
    			<?php _e('No comments yet.', 'inove'); ?>
    
    	<?php
    		}
    	?>
    
    	<!-- comments END -->

    Hopefully you can see where I put it in is case I did something wrong. I really appreciate you help.

    Robert

    (@instantshift)

    try this one.

    <!– comments START –>
    <ol id=”thecomments”>
    <?php
    if ($comments && count($comments) – count($trackbacks) > 0) {
    // for WordPress 2.7 or higher
    if (function_exists(‘wp_list_comments’)) {
    wp_list_comments(‘type=comment&avatar_size=64’);
    // for WordPress 2.6.3 or lower
    } else {
    foreach ($comments as $comment) {
    if($comment->comment_type != ‘pingback’ && $comment->comment_type != ‘trackback’) {
    custom_comments($comment, null, null);
    }
    }
    }
    } else {
    ?>

    <li class=”messagebox”>
    <?php _e(‘No comments yet.’, ‘inove’); ?>

    <?php
    }
    ?>
    <!– comments END –>

    Thread Starter lefturns190

    (@lefturns190)

    Well that was exciting! It fixed my avatar sizes but wiped out my theme for my comment boxes! Must be pretty dang close to getting it!

    Thread Starter lefturns190

    (@lefturns190)

    Is there anyway you can see where I can keep the code for styling the comment boxes and still have larger avatars?

    Are these the “gravatars” you’re talking about? I thought they were a fixed size so they were more ar less a “universal” fit size.

    Thread Starter lefturns190

    (@lefturns190)

    Saurus: No, the WD theme sets the size… Gravatars can be very large. I’ve already made them large on my site… it’s just that it killed the style code for my comments.

    That’s interesting. have you seen this done on other sites hosted by wp.com? Is there any way you can let us see a comment on your site without being logged in so we can examine the page code?

    Thread Starter lefturns190

    (@lefturns190)

    Saurus: Feel free to visit my site: https://3widealley.com/wordpressblog/?p=155

    I think the fix listed above by instantshift will work for most themes, but for iNove, you need to do the following method:

    1. Open functions.php and find get_avatar($comment, 32);
    2. Change 32 to the size (pixels) you want.

    Real easy and works like a charm!

    Thanks again for your help instantshift!

    @lefturns190 thanks!! you’ve made my day! =)

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Increasing the size of avatars’ is closed to new replies.