Don’t know why my ratings are only displaying in first page of my store

This topic has 5 replies, 2 voices, and was last updated 2 weeks, 4 days ago ago by Luca Rossi

  • Avatar: Daniel
    Daniel
    Participant
    November 5, 2024 at 11:48

    Hi! I’m using a shortcode under the title in Products archive. This shortcode is added in my functions.php archive with this lines:
    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(‘[revi_widget_product_small]’);
    }
    ans this is working, but when i click on “Load more” button in my store page, the ratings are not displayed. Please i need to fix this, i need to display the ratings with the shortcode even when you press load more.

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    4 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    November 5, 2024 at 16:29

    Hi @Daniel,

    That hook will not work for the AJAX pagination(load more, infinite scroll, …).

    Please try adding this custom code under functions.php file locates in your child theme and delete the previous code:

    
    function woocommerce_template_loop_product_title() {
    	echo '<h2 class="' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '">' . get_the_title() . '</h2>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    	echo do_shortcode('[revi_widget_product_small]');
    }
    

    Hope it helps!

    Avatar: Daniel
    Daniel
    Participant
    November 6, 2024 at 09:14

    Hi Luca, i have added that code under functions.php of my child-theme and isn’t working fine yet. It displays the ratings in the first load but when i click on load more no ratings are displayed. I give you wordpress access in private content area to fix this.

    Please contact administrator
    for this information.
    Avatar: Daniel
    Daniel
    Participant
    November 6, 2024 at 09:15

    It’s important to me achieve this because it’s an active website with orders every day… I will appreciate if you fix it 😉

    Avatar: Justin
    Luca Rossi
    Support staff
    November 6, 2024 at 10:08

    Dear Daniel,

    We hope this message finds you well.

    We have reviewed the HTML code, and it appears to be loading correctly. However, the star ratings are not displaying as expected. You can view the issue here: [Screenshot](https://prnt.sc/UZpQuX6la3eC).

    We kindly recommend reaching out to the plugin’s author for further assistance, as issues related to third-party plugins fall outside the scope of our standard support services.

    For your convenience, here is the support link for the plugin: [WordPress Plugin Support](https://wordpress.org/support/plugin/revi-io-customer-and-product-reviews/).

    Thank you for your understanding.

    Best regards,
    The 8Theme Team

  • Viewing 5 results - 1 through 5 (of 5 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.