• This code last comments in sidebar.

    And there gravatars are requested from the server, not from the cache.

    $comments = get_comments('status=approve&number=5'); ?>
    <ul>
    <?php foreach ($comments as $comment) { ?>
        <li><?php
            $title = get_the_title($comment->post_ID);
            echo get_avatar( $comment, '42' );
            echo strip_tags($comment->comment_author);
            ?>&nbsp;<?php
            echo wp_html_excerpt( $comment->comment_content, 35 ); ?>
            <a href="<?php echo get_permalink($comment->post_ID); ?>" rel="external nofollow" title="<?php echo $title; ?>"> <?php echo $title; ?> </a>
        </li>
    <?php }  ?>

    I beg you to correct this.

    Sorry for my English.

  • The topic ‘In “recent comments”, Gravatars are shown not from the cache’ is closed to new replies.