Add Link to Facebook
Facebook Avatar's Not showing UP (7 posts)

  1. jeremyers1
    Posted 5 years ago #

    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:


  2. M66B
    Posted 5 years ago #

    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.

  3. jeremyers1
    Posted 5 years ago #

    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'); ?>

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

  4. jeremyers1
    Posted 5 years ago #

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

  5. M66B
    Posted 5 years ago #

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

  6. jeremyers1
    Posted 5 years ago #

    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 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']))) ?>

    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'); ?>
  7. M66B
    Posted 5 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Add Link to Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic