Tuesday, November 24, 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 wish to show the total number of comments in your WordPress website?

Feedback permit customers to take part and interact with the content material in your web site. By exhibiting off the overall remark depend, you possibly can encourage extra customers to affix the dialog.

On this article, we’ll present you learn how to simply show the total number of comments in WordPress, with or with out a plugin.

Show WordPress Remark Depend utilizing a Plugin

This methodology is less complicated and it is suggested for all customers. As a substitute of writing code, you’ll be utilizing a plugin to show remark depend in WordPress.

First, it’s worthwhile to set up and activate the Easy Weblog Stats plugin. Chances are you’ll learn our step-by-step information on learn how 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 indicate totally different stats like the total number of comments, registered customers, variety of posts, classes, web page depend, and extra.

You must copy the shortcode [sbs_approved] to show the overall variety of authorised feedback in your WordPress website.

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

On the publish edit display, it’s worthwhile 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’s worthwhile to click on on it so as to add the shortcode block to the editor.

Subsequent, it’s worthwhile to paste the shortcode [sbs_approved] contained in the block settings.

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

Alternatively, you may also use the shortcode inside a paragraph block. Merely copy and paste the shortcode the place you wish to show the remark depend.

Utilizing the paragraph block may also mean you can use the textual content styling possibility obtainable within the WordPress block editor.

As soon as you’re carried out, click on on the publish or replace button to avoid wasting your modifications. Now you can go to your web site to see your modifications in motion.

Displaying complete remark depend 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 neglect 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)

If you happen to don’t wish to use a plugin, then you should use show the overall remark depend manually.

This methodology requires you so as to add a code snippet to your web site. If you happen to haven’t carried out this earlier than, then please take a look at our information on learn how to copy and paste code snippets in WordPress.

Earlier than you do something, it’s best to make a full backup of your web site. This can enable you to to revive your website in case you break something whereas modifying the theme recordsdata.

Now it’s worthwhile to add the next code to your theme’s capabilities.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 operate that outputs the overall variety of authorised WordPress feedback 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 total number of comments in your web site.

That is the way it seemed on our demo website:

We hope this text helped you show the total number of comments in your WordPress website. You may additionally wish to take a look at our information on learn how to stop remark spam in WordPress and the finest WordPress plugins for each web site.

You May Also Like : How to Disable PHP Execution in Certain WordPress Directories

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

24 Best Online Jobs from Home Without Investment

Do you already know online jobs and work from dwelling jobs have gotten a scorching development after Covid-19. Earlier there have been a handful...

Top 25 Data Entry Jobs from Home Online/Offline: No Investment

Data Entry jobs are actually nice for individuals who need to work from house however not a lot certified. Whether you're a housewife, a...

What is the average salary in India?

Why you should learn about the average salary in India and remainder of the world. It is essential to your profession so it's a must...

Best Courses after 10th Standard

Results for 10th normal are simply being declared throughout India. As pupil or guardian, you should be fearful about greater schooling courses after 10th normal. Nowadays, there...

Recent Comments