Count the Total Threaded Conversations in Your Post Comments with Greg’s Show Total Conversations Plugin

avatar image

The latest in our series of plugins for fellow WordPress bloggers, this plugin displays the total number of threaded conversations contained within a post’s comments.

More on WordPress plugins

Greg’s WordPress plugins available at CounsellingResource.com can help you to:

Would you like to reach the community of bloggers using particular plugins? Check out the Sustainable Plugins Sponsorship Network.

IMPORTANT UPDATE: This plugin now has a newer version! For information on the version 1.1 release, please see the update announcement here: “WordPress Show Total Conversations Plugin Updated”.

[Just take me to the plugin!]

Why a WordPress Plugin?

As I’ve mentioned in the announcements for the other two entries in our series of WordPress plugins (see “Greg’s Threaded Comment Numbering Plugin for WordPress” and “Greg’s Comment Length Limiter Plugin for WordPress”), we use several bits of custom code in the blogs we run here at CounsellingResource.com. I’m now releasing another of those pieces of custom software in the form of a plugin to help other WordPress bloggers.

Highlighting Your Threaded Conversations With a WordPress Plugin

WordPress 2.7 introduced native comment threading, enabling your blog’s readers to reply directly to one another’s comments. But while WordPress keeps track of the total number of comments on a given post, providing a function which theme creators can use to show that total, it doesn’t offer any easy way to track how many of the comments have wound up initiating threaded conversations.

This plugin counts those conversation threads for you and displays the total — with no theme modifications required. You can even choose to show conversation totals on your post and comment admin pages.

For extra flexibility, coders can also tap into the plugin’s core function directly.

This plugin counts any sequence of threaded replies to a top-level comment as a single ‘conversation’. However many times a conversation might branch off into further threaded replies, the plugin still counts it just once.

Greg's Show Total Conversations plugin in use

Conversations Total Displayed with WordPress Default Theme

Installing Greg’s Show Total Conversations Plugin

Installation works just like any other WordPress plugin: just unzip the plugin archive and upload it to /wp-content/plugins/ — be sure to upload the entire folder gregs-show-total-conversations. Then you can activate the plugin via the WordPress ‘Plugins’ menu, and configure options via Settings -> Show Total Conversations.

How to Use Greg’s Show Total Conversations Plugin

No theme modifications are required to use this plugin — the plugin’s settings page enables you to specify which pages should include a conversation total. If you’d like more flexibility, however, you can call the plugin’s core function directly.

Basic Usage

Just enable the plugin and visit Settings -> Show Total Conversations to configure your preferences.

Greg's Show Total Conversations plugin options and settings

Conversations Total Options

Advanced Usage

You can show the conversations total by calling the following function directly, preferably wrapped in a conditional which tests whether the function exists (i.e., tests whether the plugin is enabled):

<?php gstc_show_discussions_number_manually(); ?>

This function takes optional parameters specifying your preferred message for zero conversations, one conversation, or more than one conversation. The parameters work exactly like those for the built-in WordPress function comments_number:

<?php gstc_show_discussions_number_manually($zero, $one, $more); ?>

The character % in the parameter $more will be replaced with the conversation total.

Safe Wrapping of Plugin-Dependent Function Calls

I cover safe wrapping of plugin-dependent function calls on the information page for one of my other plugins: “Greg’s Threaded Comment Numbering Plugin for WordPress”.

Deactivating and Uninstalling this WordPress Plugin

You can deactivate Greg’s Show Total Conversations plugin via the plugins administration page, and your preferences will be saved for the next time you enable it.

However, if you would like to remove the plugin completely, just disable it via the plugins administration page, then select it from the list of recently deactivated plugins and choose “Delete” from the admin menu. This will not only delete the plugin, but will also run a special routine included with the plugin which will completely remove its preferences from the database.

Frequently Asked Questions About Greg’s Show Total Conversations Plugin

After enabling the plugin, why don’t I see any changes in my comment numbers?
If you don’t have comment threading enabled, the plugin won’t add any extra information about your threaded conversations.

Revision History

I’ve moved the revision history to the README file distributed with the plugin.

Fine Print for this WordPress Plugin

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Get the Plugin!

You can download the plugin right here: Greg’s Show Total Conversations Plugin.

About the Author: With an educational background in philosophy and mathematics, as well as in counselling, Dr Mulhauser enjoys publishing CounsellingResource.com, providing online counselling and therapy services, and spending time with his family.

This article was last reviewed by Dr Greg Mulhauser, Managing Editor on Monday, 16th February 2009. You can leave a reply below.

The URL of this page is:
http://counsellingresource.com/features/2009/02/16/show-total-conversations/

3 Responses (Including One Discussion Thread) to “Greg’s Show Total Conversations Plugin for WordPress”

  1. avatar image
    BARON
    1

    Works great, thank you


  2. avatar image
    steven
    2

    how do i enable plugins on wordpres. i’ve visited many sites and still have no reliable info. in my control panel there is no “plugins”

    i have several plugins ready to upload into my blog that i’ve downloaded. any assistance is greatly appreciated.

    help?

    thanks!


Join the Discussion!

We support Gravatars rated PG or G; if you don't have a Gravatar, we'll display a mathematically created identicon next to your comment.

(A valid email address is required to enable you to personally verify and authorize your comment for posting. It will not be displayed in your post or used in any other way. SPAM comments will be deleted immediately.)

 characters available

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting