Title: Loop Shortcode Issue
Last modified: January 8, 2021

---

# Loop Shortcode Issue

 *  [edival](https://wordpress.org/support/users/edival/)
 * (@edival)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/loop-shortcode-issue/)
 * I’m using a page builder and the shortcode isn’t displaying the Add to Wishlist
   heart/text.
 * This is what it’s outputting to the source code which appears to be incorrect
   and I’m not sure why:
    `<div class="yith-wcwl-add-to-wishlist add-to-wishlist-
   223 exists wishlist-fragment on-first-load" data-fragment-ref="223" data-fragment-
   options="{"base_url":"","in_default_wishlist":true,"is_single":false,"show_exists":
   false,"product_id":223,"parent_product_id":223,"product_type":"simple","show_view":
   false,"browse_wishlist_text":"Browse wishlist","already_in_wishslist_text":"","
   product_added_text":"Product added!","heading_icon":"fa-heart-o","available_multi_wishlist":
   false,"disable_wishlist":false,"show_count":false,"ajax_loading":false,"loop_position":"
   shortcode","item":"add_to_wishlist"}">`
 * The double quotes within the double quotes are incorrect. On a loop item that’s
   working we should see the inside quotes ":
    `<div class="yith-wcwl-add-to-wishlist
   add-to-wishlist-265 wishlist-fragment on-first-load" data-fragment-ref="265" 
   data-fragment-options="{&quot;base_url&quot;:&quot;&quot;,&quot;in_default_wishlist&
   quot;:false,&quot;is_single&quot;:false,&quot;show_exists&quot;:false,&quot;product_id&
   quot;:265,&quot;parent_product_id&quot;:265,&quot;product_type&quot;:&quot;simple&
   quot;,&quot;show_view&quot;:false,&quot;browse_wishlist_text&quot;:&quot;Browse
   wishlist&quot;,&quot;already_in_wishslist_text&quot;:&quot;&quot;,&quot;product_added_text&
   quot;:&quot;Product added!&quot;,&quot;heading_icon&quot;:&quot;fa-heart-o&quot;,&
   quot;available_multi_wishlist&quot;:false,&quot;disable_wishlist&quot;:false,&
   quot;show_count&quot;:false,&quot;ajax_loading&quot;:false,&quot;loop_position&
   quot;:&quot;before_image&quot;,&quot;item&quot;:&quot;add_to_wishlist&quot;}"
   >`
 * Any idea why this is happening?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Floop-shortcode-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/loop-shortcode-issue/#post-13892981)
 * Hi there
 * This is really strange, expecially since it isn’t always happening
    There is 
   no difference in the button added to the loop and the button obtained with the
   shortcode (indeed, we use shortcode to print button in the loop)
 * Could you please explain a bit better how to reproduce the issue? I’d be glad
   to perform a test on local installation, if possible
 *  Thread Starter [edival](https://wordpress.org/support/users/edival/)
 * (@edival)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/loop-shortcode-issue/#post-13893005)
 * I’m using Divi and Divi Engine for the broken one, whereas only Divi for the 
   working one, so I’m not sure if Divi Engine might change the system. I’m thinking
   Divi Engine runs after the Yith JS executes which misses the timing for Yith 
   to manipulate the DOM elements. But when I looked at the raw page source I noticed
   the above issue which is where my concern starts.
 * Not sure how to explain it any better. Maybe there’s a way to run the Yith wishlist
   JS after the page is loaded? I couldn’t find that option.
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/loop-shortcode-issue/#post-13895688)
 * Hi there
 * Wishlist specific js executes on document ready; if you want to re-run initialization
   for Wishlist elements, you can do so by executing the following line of JS at
   the specific trigger where it is needed:
 *     ```
       $(document).trigger('yith_wcwl_init');
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Loop Shortcode Issue’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-wishlist/assets/icon-128x128.gif?rev=3129302)
 * [YITH WooCommerce Wishlist](https://wordpress.org/plugins/yith-woocommerce-wishlist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-wishlist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/loop-shortcode-issue/#post-13895688)
 * Status: not resolved