• Hi, we are using the recent comments widget in a sidebar on our bog. I’ve been requested to show a ‘teaser’ of the comment as well, can this be done? If so, how?
    We are using a child of Arras them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    try this (not tested):

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

    (@anurspas)

    Thank you for your quick response.

    However, I discovered that the Recent Comments widget was being used and not the Get Recent Comments widget. The Get Recent Comments widget allows for the teaser.

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

The topic ‘recent comments widget summary’ is closed to new replies.