Shortcode for Displaying Total number of Comments
-
1. Have you tried using the summary shortcode like this?
[site_reviews_summary hide=bars,rating,stars]
This will show something like:
4.5 out of 5 stars (based on 35 reviews)
2. You can also add the “text” option to change the summary text directly in the shortcode:
[site_reviews_summary hide=bars,rating,stars text="{num} Customer Reviews"]
3. The problem with option 2 is that it does not account for instances when there is only 1 review (i.e. “1 Customer Reviews” instead of “1 Customer Review”). So, you can instead do something like this:
However, this will change the summary text for all instances of the summary shortcode.
- This reply was modified 5 years, 10 months ago by Gemini Labs.
- This reply was modified 5 years, 10 months ago by Gemini Labs.
Hi,
I have tried these short codes and working. Thank you for sharing the code.But i need to display the comments/Star rating separately for each blog posts single page and blog main page. So, the users can identify each blog post star rating count and comments like the products rating.
How can we get the star rating for each post separately. Can you help me.Please see the “assign_to” and “assigned_to” options on the Shortcode documentation page of the plugin (Site Reviews > Get Help)
I could see the option.
But is there any way/settings to assign each comments/rating automatically to the corresponding posts. Currently, if an user add the comments, it does not allocate/assign to any posts.As shown in the documentation for each shortcode:
[site_reviews_form assign_to=post_id]
[site_reviews assigned_to=post_id]
[site_reviews_summary assigned_to=post_id]
Note the difference in “assign_to” and “assigned_to”.
- This reply was modified 5 years, 10 months ago by Gemini Labs.
Thank you for the sample.
Now it is working based on my requirements.
It would be great, if you can add the above sample Short code in the plug-in help section.@shamjith Shortcode documentation has been updated in the latest unreleased (but stable) 3.0 beta version. Feel free to try it out: https://pastebin.com/raw/Mgr28aJs
- The topic ‘Shortcode for Displaying Total number of Comments’ is closed to new replies.
(@shamjith)
5 years, 10 months ago
Hi,
I would like to display the total number of comments for each posts. Is there any short code for displaying the comments count.
Example: (9 Customer Reviews)