Title: [Plugin: Top Commentators Widget] How show inside post?!
Last modified: August 20, 2016

---

# [Plugin: Top Commentators Widget] How show inside post?!

 *  [lordmarcio](https://wordpress.org/support/users/lordmarcio/)
 * (@lordmarcio)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-top-commentators-widget-how-show-inside-post/)
 * I want to configure for show inside of a post/page!
 * How??? I don’t know!!
 * [http://wordpress.org/extend/plugins/top-commentators-widget/](http://wordpress.org/extend/plugins/top-commentators-widget/)

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

 *  Plugin Author [Lorna Timbah](https://wordpress.org/support/users/webgrrrl/)
 * (@webgrrrl)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-top-commentators-widget-how-show-inside-post/#post-2895378)
 * Go to Appearance / Widgets, and find in the TCW settings the section called **
   Show in home page only**. Set that to **No**.
 *  Thread Starter [lordmarcio](https://wordpress.org/support/users/lordmarcio/)
 * (@lordmarcio)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-top-commentators-widget-how-show-inside-post/#post-2895380)
 * I learned | must edit ‘function.php’ >>
 *     ```
       function top_comment_authors($atts, $content = null) {
           extract(shortcode_atts(array(
               "amount" => '5'
           ), $atts));
           global $wpdb;
           $results = $wpdb->get_results('
               SELECT
               COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url
   
               FROM
               '.$wpdb->comments.'
   
               WHERE
               comment_author_email != "" AND comment_type = "" AND comment_approved = 1
   
               GROUP BY
               comment_author_email
   
               ORDER BY
              comments_count DESC, comment_author ASC
               LIMIT '.$amount
           );
           $screen = "<ul>";
   
           foreach($results as $result){
   
               $screen .= '<li class="top_commentators"><a title="' . $result->comment_author_url . '" href="' . $result->comment_author_url . '" target="_blank" rel="nofollow">' . get_avatar( $result->comment_author_email, $size = '30', '', 'avatar' ) . $result->comment_author . '</a> [' . $result->comments_count . ']</li>';
           }
   
           $screen .= "</ul>";
   
           return $screen;
       }
   
       add_shortcode("top_commentators", "top_comment_authors");
       ```
   
 * shortcode = [top_commentators amount=X]
 *  Plugin Author [Lorna Timbah](https://wordpress.org/support/users/webgrrrl/)
 * (@webgrrrl)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-top-commentators-widget-how-show-inside-post/#post-2895408)
 * Those codes are not from the Top Commentators Widget that you linked here. You
   must be referring to [codes similar to this](http://www.paulund.co.uk/display-top-commenters-on-wordpress-blog).

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

The topic ‘[Plugin: Top Commentators Widget] How show inside post?!’ is closed to
new replies.

 * ![](https://ps.w.org/top-commentators-widget/assets/icon-256x256.png?rev=1312425)
 * [Top Commentators Widget](https://wordpress.org/plugins/top-commentators-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-commentators-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-commentators-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/top-commentators-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-commentators-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-commentators-widget/reviews/)

## Tags

 * [commentators](https://wordpress.org/support/topic-tag/commentators/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 3 replies
 * 2 participants
 * Last reply from: [Lorna Timbah](https://wordpress.org/support/users/webgrrrl/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-top-commentators-widget-how-show-inside-post/#post-2895408)
 * Status: not a support question