Comment Counts
Showing the number of comments of each article on your index/listing pages increases the engagements on your website. This page explains how to add comments counts to your website when using Hyvor Talk.
Note: Our WordPress plugin and Blogger widget automatically set comment counts. However, some themes may require you to manually set it up.
-
Add the following code before the
</body>
tag in your index/listing pages. You should replaceYOUR_WEBSITE_ID
with your actual website ID, which you can get from the General section of the console.<script type="text/javascript"> var HYVOR_TALK_WEBSITE = YOUR_WEBSITE_ID; </script> <script async type="text/javascript" src="//talk.hyvor.com/web-api/count/"></script>
-
Add span elements with the
data-talk-id
attribute. This attribute should be the page identifier of the page you need the comment count of. The number of comments will appear inside this span element.<span data-talk-id="PAGE_IDENTIFIER"></span>
By default, the text of the span will be something like "13 comments" according to your comment count text format. If you only need the number, you can add
data-talk-mode="number"
attribute to the span element.<span data-talk-mode="number"></span>
Changing Comment Count Text Format
You can change the format of the comment counts in the Moderate -> Community section of the console.