Viewing 1 replies (of 1 total)
  • Plugin Author YITHEMES

    (@yithemes)

    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.