Top users WordPress plugin

I wrote a new plugin to list the contributors to a WordPress website. The comment and post counts are added together, and the top X users are listed in a simple table alongside the counts.


Installation instructions

  1. Upload the `top-users-by-comment-plus-post-count` folder to the `/wp-content/plugins/` directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place this or a similar function call in your theme: <?php top_users_by_comment_plus_post_count( 10 ); ?>

CSS sample

This is the CSS I am using to style the output.

#top-users-by-comment-plus-post-count td.tu-author{ padding-right: 8px; }
#top-users-by-comment-plus-post-count td.tu-count{ text-align: right; }

Sample output

I added tab and line break characters for readability.

<table id="top-users-by-comment-plus-post-count">
	<tr><td class="tu-author">DisgustedInDenver</td><td class="tu-count">297</td></tr>
	<tr><td class="tu-author">Corey</td><td class="tu-count">109</td></tr>
	<tr><td class="tu-author">G11</td><td class="tu-count">60</td></tr>
	<tr><td class="tu-author">jmbecker13</td><td class="tu-count">10</td></tr>
	<tr><td class="tu-author">trustmedotcom</td><td class="tu-count">9</td></tr>
	<tr><td class="tu-author">ulfwolf</td><td class="tu-count">8</td></tr>
	<tr><td class="tu-author">noscamsforme</td><td class="tu-count">8</td></tr>
	<tr><td class="tu-author">who8dapple</td><td class="tu-count">7</td></tr>
	<tr><td class="tu-author">cindmo</td><td class="tu-count">7</td></tr>
	<tr><td class="tu-author">nytemare4u</td><td class="tu-count">7</td></tr>

3 responses to “Top users WordPress plugin”

  1. Will you add a settings page where the top followers will be shown to the admin alone? I don’t want to display them in my blog, I just want to have a list in my dashboard – and I’m admittedly too lazy to look into the whole plugin-thing to do it myself. Also, I’m probably not intelligent enough to make it work. *sigh*

  2. Patricia:

    No. You could create a private or password protected page to hide the data from the rest of your users. I do not want to make this plugin more complicated than it needs to be. Thanks for trying it out.

  3. I did this:
    Activate the plugin through the ‘Plugins’ menu in WordPress

    But am lost on this bit. Where do I place it?? exactly?

    Place this or a similar function call in your theme:

    I tried placing it in the Stylesheet CSS but nothing happened please direct a “Noob”

Leave a Reply

Your email address will not be published. Required fields are marked *