How can I add a shortcode of my reviews widget under the title of each product?

This topic has 2 replies, 2 voices, and was last updated 2 hours, 5 minutes ago ago by Luca Rossi

  • Avatar: Daniel
    Daniel
    Participant
    October 8, 2024 at 12:17

    I want to add a shortcode under the title of each product that includes the product reviews but I don’t know how to do it, I have managed to do it on the single-product page because I could edit it with Elementor but I also want the reviews to appear under the title of each product in this page for example: https://test.servihogartarraco.com/tienda-recambios/ or this https://test.servihogartarraco.com/ in section “Productos recien llegados”

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    1 Answer
    Avatar: Justin
    Luca Rossi
    Support staff
    October 9, 2024 at 05:21

    Dear @Daniel,

    We hope this message finds you well. We would like to assist you with the integration of custom code into your website. Please proceed by inserting the following code into the functions.php file located in your child theme:

    
    add_action('woocommerce_shop_loop_item_title', 'n2t_after_etheme_product_grid_list_product_element_title', 999);
    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]');
    }
    

    We trust this code will meet your needs. Should you have any further questions or require additional assistance, please do not hesitate to contact us.

    Best regards,
    The 8Theme Team.

  • 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.