Page 1 of 1

Display the total number of comments in a post or on a page

Posted: Mon Jan 20, 2025 6:48 am
by Mostafa044
Once you have the shortcode you want, simply go to the page or post where you want to display the total number of comments.

Click the “+” button here to add a new block. You can now start typing “Shortcode” and select the correct block when it appears.

Add Shortcode Block to a WordPress Page
Then simply insert the shortcode into the block.

You can add any text to appear before or after the shortcode.

Paste Shortcode to the Shortcode Block
Another option is to use the shortcode within a paragraph block.

Simply paste the shortcode where you want to display the total number of comments.

Paragraph block with comment count shortcode inside it
The Paragraph block also allows you to style the overall comments with the default text formatting settings. For example, you can make it bold or italic or change the text color .

When you're done, click the Publish or Update button to list of switzerland cell phone number save your changes. You can now visit your website to see the live comment count.

Comment count displayed in a WordPress post
Displaying the total number of comments in a sidebar widget

You can also paste the total comments shortcode into a sidebar or similar area. This is an easy way to display the number of comments across your entire WordPress site, as you can see in the image below.

How to display the total WordPress comment count in a sidebar
To add the comment count to a sidebar or similar area, go to Appearance » Widgets .

Here you can see a list of all the available widget areas. For example, in the image below we are using the ThemeIsle Hestia Pro theme which has several widget areas including the sidebar, header and footer.