Thursday, December 3, 2020
Home Blogging How to Display the Total Number of Comments in WordPress

How to Display the Total Number of Comments in WordPress

Do you need to show the overall variety of comments in your WordPress website?

comments permit customers to take part and have interaction with the content material in your web site. By displaying off the overall remark rely, you possibly can encourage extra customers to affix the dialog.

On this article, we’ll present you easy methods to simply show the overall variety of comments in WordPress, with or with out a plugin.

Show WordPress Remark Depend utilizing a Plugin

This methodology is simpler and it’s endorsed for all customers. As a substitute of writing code, you’ll be utilizing a plugin to show remark rely in WordPress.

First, it is advisable to set up and activate the Easy Weblog Stats plugin. Chances are you’ll learn our step-by-step information on easy methods to set up a WordPress plugin for detailed directions.

Upon activation, go to Settings » Easy Weblog Stats web page to configure plugin settings.

On this web page, you’ll see all of the shortcodes that you should use to point out totally different stats like the overall variety of comments, registered customers, variety of posts, classes, web page rely, and extra.

It’s worthwhile to copy the shortcode [sbs_approved] to show the overall variety of accredited comments in your WordPress website.

If you wish to show it in a put up or web page, then merely create a brand new put up or edit an present one.

On the put up edit display, it is advisable to add the shortcode block within the WordPress content material editor.

You are able to do this by clicking on the Add block (+) icon after which seek for the shortcode block. As soon as you discover it, it is advisable to click on on it so as to add the shortcode block to the editor.

Subsequent, it is advisable to paste the shortcode [sbs_approved] contained in the block settings.

You’ll be able to add any textual content you need to show earlier than or after the shortcode.

Alternatively, you too can use the shortcode inside a paragraph block. Merely copy and paste the shortcode the place you need to show the remark rely.

Utilizing the paragraph block can even let you use the textual content styling possibility out there within the WordPress block editor.

As soon as you might be completed, click on on the publish or replace button to avoid wasting your adjustments. Now you can go to your web site to see your adjustments in motion.

Displaying complete remark rely in a sidebar widget

You too can use the identical shortcode inside a WordPress widget and show it in your weblog’s sidebar.

Merely head over to the Look » Widgets web page and add a ‘Textual content’ widget to the sidebar.

Subsequent, go forward and paste your shortcode contained in theTextual content’ widget.

Don’t overlook to click on on the ‘Save’ button to retailer your widget settings.

Now you can go to your web site to see the widget in motion.

Show WordPress Remark Depend (with out a plugin)

Should you don’t need to use a plugin, then you should use show the overall remark rely manually.

You May Also Like : How to Easily Display Code on Your WordPress Site

This methodology requires you so as to add a code snippet to your web site. Should you haven’t completed this earlier than, then please take a look at our information on easy methods to copy and paste code snippets in WordPress.

Earlier than you do something, you need to make a full backup of your web site. This can assist you to to revive your website in case you break something whereas modifying the theme information.

Now it is advisable to add the next code to your theme’s features.php file or a site-specific plugin:

function wpb_comment_count() {
$comments_count = wp_count_comments();
$message 'There are <strong>'$comments_count->approved . '</strong> comments posted by our users.';
return $message;

This code creates a perform that outputs the overall variety of accredited WordPress comments in your website. It additionally creates a shortcode to show it.

Now you can use the shortcode [wpb_total_comments] in your posts, pages, or a textual content widget to show the overall variety of comments in your web site.

That is the way it regarded on our demo website:

We hope this text helped you show the overall variety of comments in your WordPress website. You may additionally need to take a look at our information on easy methods to forestall remark spam in WordPress and the finest WordPress plugins for each web site.

If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.



Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

LIC Premium Paid Certificate Download For Income Tax Purpose – Online

You should be conscious that it's necessary to provide Premium Paid Certificate for insurance coverage insurance policies to avail Income tax exemption profit underneath...

Leave Encashment Calculation & Tax Implications

Leave Encashment is a course of the place you may get cash for the unused stability leaves. Most of the persons are not conscious...

Rakesh Jhunjhunwala Portfolio Holdings

Rakesh Jhunjhunwala, 60, India’s most profitable fairness investor who made 2.9 Billion {dollars} (290 crores USD) ranging from $100. Rakesh Jhunjhunwala is a clever man with...

Angel Broking Vs Zerodha Broker Comparison : Brokerage, Margin, Charges

I've carried out the comparability between Angel Broking vs Zerodha (a reduction dealer) on this article. If you might be on the lookout for advisory dealer...

Recent Comments