Support » Plugin: Add Link to Facebook » Facebook Avatar's Not showing UP

  • First, this is an AWESOME plugin.

    How about creating one for Twitter also, which allows comments to be posted on Twitter?

    Anyway, I love the feature that pulls comments from Facebook and posts comments to Facebook.

    I cannot figure out how to get the Facebook Avatar’s to appear. Instead, I just get the default image on my post. However, inside the WordPress Dashboard, when I look at the comments, I see the Facebook Avatar there. Any idea what setting I am using to keep the Facebook Avatar from appearing on the blog posts themselves?

    Here is an example:

    http://www.tillhecomes.org/jeremy-myers-in-high-school/

Viewing 6 replies - 1 through 6 (of 6 total)
  • My best guess is that your theme doesn’t call the ‘get_avatar‘ function. Which theme are you using? You could try to temporarily switch to the default WordPress theme (Twenty Ten) to see if this is indeed the problem. Another possibility is that another plugin is interfering.

    Looks like you are right about my theme.

    I’m using Standard Theme.

    This is the code in comments.php:

    <ol class="commentlist">
    <?php wp_list_comments('avatar_size=36&callback=custom_comment&type=comment'); ?>
    </ol>

    I have submitted a help ticket to the Theme’s support site.

    I added a function to my theme, and got it working. Thanks for the tip!

    You’re very welcome. What did you change exactly? I like to know so I can maybe help others with it.

    I added this to my functions.php

    // --------------- GraceBlogger Custom Comment -------------------- //
    
    function graceblogger_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    <div id="comment-<?php comment_ID(); ?>">
    <div class="comment-container">
    <div class="comment-head">
    <div class="avatar">
    <?php echo get_avatar($comment,$size='36',$default='<http://www.tillhecomes.org/wp-content/themes/StandardTheme_261/admin/images/blank-gravatar.jpg>' ); ?></div>
    <span class="name"><?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?></span>
    <span class="date"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></span>
    <span class="edit"><?php edit_comment_link(__('(Edit)'),' ','') ?></span>
    <span class="perma"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"> #</a></span>
    <div class="fix"></div>
    </div>
    
    <div class="comment-entry"><?php comment_text() ?></div>
    
    <div class="reply">
    <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    </div>
    </div>
    </div>
    <?php
    }

    And then changed the code in comments.php to call the function.

    <ol class="commentlist">
    <?php wp_list_comments('avatar_size=36&callback=graceblogger_comment&type=comment'); ?>
    </ol>

    Thanks for sharing this. Your new comment function is properly calling the ‘get_avatar‘ function.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Facebook Avatar's Not showing UP’ is closed to new replies.