• Resolved bonobo1

    (@bonobo1)


    I have activated the option to display the wishlist option in the loop.

    To display the Add To Wishlist icon, I use the shortcode [yith_wcwl_add_to_wishlist].

    When I visit the shop page (it uses default query) the icon is displayed correctly.

    When the user clicks on a category, an ajax call is performed; here, the server executes a new WP_Query() according to the filters the user has provided.

    Upon printing the products from the loop, the icon is not displayed. However, I see that the shortcode executed, as the parent container <div class="yith-wcwl-add-to-wishlist...></div> is there. The child that actually contains the icon is missing.

    Am I missing something or is this default behavior? Thanks in advance!

    • This topic was modified 3 years, 7 months ago by bonobo1. Reason: Added polite ending to the question
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Antonio La Rocca

    (@therock130)

    Hi there

    My best guess is that you have “AJAX Loading” option enabled
    This forces system to print a “placeholder” instead of proper ATW buttons, and then retrieves updated template of the buttons via AJAX, to replace them in the page

    This normally happens on page load, but if you change the content of your page via JS, and want to re-init ATW buttons, you may want to explicitely execute this code once new content is loaded in the DOM

    jQuery(document).trigger( 'yith_wcwl_init' );
    
    Thread Starter bonobo1

    (@bonobo1)

    Indeed, deactivating the AJAX loading option from the plugin’s menu did the trick. Thanks!

    Plugin Support Antonio La Rocca

    (@therock130)

    Hi @bonobo1
    You’re welcome!

    I’m marking this thread as solved
    If you enjoyed our plugin and support, please don’t forget to leave us a 5 star review: it helps more than it appears, and we would greately appreciate

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add To Wishlist Option Not Displayed For Products from Custom Query’ is closed to new replies.