Title: Placing Shortcode
Last modified: August 30, 2016

---

# Placing Shortcode

 *  [nilje](https://wordpress.org/support/users/nilje/)
 * (@nilje)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-shortcode/)
 * Hi
    I can’t seem to get the shortcode working.
 * the code would be
    echo do_shortcode( ‘[yith_wcwl_add_to_wishlist]’ ); right?
 * I would like to place it below ‘add to card’
    Where should I place the code?
 * Thanks!!
 * [https://wordpress.org/plugins/yith-woocommerce-wishlist/](https://wordpress.org/plugins/yith-woocommerce-wishlist/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-shortcode/#post-6612334)
 * Hi nilje,
 * The plugin can add “add to wishlist” shortcode in one of this locations:
    - After add to cart
    - After thumbnails
    - After summary
 * (This option will work only if your theme doesn’t remove woocommerce default 
   hooks)
 * You can set one location using option under YIT Plugins -> Wishlist -> Settings-
   > Position.
 * If you want to use a custom location, you can choose “Use shortcode” option, 
   and hook a function that prints shortcode where you want in single product page.
 * Here an exemple of code you can add to functions.php file of your theme
 *     ```
       if( ! function_exists( 'yith_woocommerce_custom_add_to_wishlist' ) ){
           function yith_woocommerce_custom_add_to_wishlist(){
               echo do_shortcode( '[yith_wcwl_add_to_wishlist]' );
           }
       }
       add_action( '<HOOK YOU SELECTED>', 'yith_woocommerce_custom_add_to_wishlist' );
       ```
   
 * Let me know if this helps you
    Have a nice day! 🙂

Viewing 1 replies (of 1 total)

The topic ‘Placing Shortcode’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/placing-shortcode/#post-6612334)
 * Status: not resolved