Integration in category pages
-
What is the best way to integrate the reviews stars into the category pages and loop template as related_products or featured_products and etc..
-
I don’t really understand this question.
Is there any way to insert the reviews in the product list (on each product) of the categories?
You are trying to show the average rating of each product in a list of products?
Have you tried something like this in the loop:
<?= do_shortcode('[site_reviews_summary assigned_to=post_id hide=bars,rating,summary]'); ?>Or if you are using Site Reviews categories (replace
??with the slug or ID of the Site Reviews category):<?= do_shortcode('[site_reviews_summary category=?? hide=bars,rating,summary]'); ?>-
This reply was modified 7 years, 5 months ago by
Gemini Labs.
Thanks you so much Gemini!
It’s almost perfect! Is there any way to show only the stars for the products that actually have reviews?
This is because products that have no reviews show 5 empty stars, which seem to be rated 0/5..
Tks in advance
Add “if_empty” to the hide option on the shortcode. Please read the Shortcode Documentation on the Get Help page for more info.
Oh, it’s true! I apologize but I got confused with [site_reviews] shortcode parameters…
The plugin is very very TOP! 😉
@ranone Feel free to try out the unreleased (but stable) v3.0 beta: https://pastebin.com/raw/Mgr28aJs
-
This reply was modified 7 years, 5 months ago by
The topic ‘Integration in category pages’ is closed to new replies.