Need to embed my own product rating shortcode in place of theme/system product rating

This topic has 2 replies, 2 voices, and was last updated 1 months, 1 weeks ago ago by Luca Rossi

  • Avatar: sethr
    sethr
    Participant
    October 17, 2024 at 15:45

    Hello, looking for a point in the right direction here. My shop page shows my products as built: https://drinkfable.com/shop/ < in each of the product cards you see the star rating, which comes via the checkbox in the Xstore product item builder area. What I need to do though, is replace this system star rating, with my 3rd party star rating—as seen on the actual product page: https://drinkfable.com/product/best-zest-cocktail/

    I have integrated the one on the product page, and have a shortcode for this element. What I need help with is how can i embed this element on the Xstore product item in place of the system one that is there now—again, on this page: https://drinkfable.com/shop/

    Thank you in advance for any help in the right direction here.

    1 Answer
    Avatar: Justin
    Luca Rossi
    Support staff
    October 18, 2024 at 03:55

    Hi @sethr,

    Please add this custom code under functions.php file locates in your child theme:

    
    add_action('after_etheme_product_grid_list_product_element_title', 'n2t_after_etheme_product_grid_list_product_element_title', 999);
    function n2t_after_etheme_product_grid_list_product_element_title(){
    	echo do_shortcode('[your-shortcode]');
    }
    

    Then hide the reviews from Product Grid element.

    Hope it helps!

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.