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.
Download top-users-by-comment-plus-post-count.zip.
Installation instructions
- Upload the `top-users-by-comment-plus-post-count` folder to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- 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>
</table>
Comments
3 responses to “Top users WordPress plugin”
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*
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.
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”