• Hi

    I install plugin of compare yith in my theme and now I want to change location of it in product page . As you see in pic pic, it is a link and have green color and in red line , How can I change place of it from current place to top of social network ? It’s address of my site : chaarsoo

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi,
    you can disable standard compare button from product page directly from plugin panel, then use this shortcode
    [yith_compare_button]
    and place it where you wish on product page template.

    Let me know if it works.
    Regards ??

    Thread Starter mahtabpi

    (@mahtabpi)

    Hi

    So Thanks . Please see this code :

    function yith_wcwl_move_compare(){
        echo do_shortcode( '[yith_compare_button]' );
    }
    add_action( 'woocommerce_single_product_summary', 'yith_wcwl_move_compare', 55 );

    I use this code in functions.php in my template . It works perfect and show aompare link in bottom but I don’t know where is standard compare button in my product page directly that I disable it . Can you tell me ?

    Thanks

    • This reply was modified 7 years, 10 months ago by mahtabpi.
    • This reply was modified 7 years, 10 months ago by mahtabpi.
    Thread Starter mahtabpi

    (@mahtabpi)

    I find it .Thanks a lot !

    Hi mAh, can I ask how you fix?

    Thread Starter mahtabpi

    (@mahtabpi)

    Hi pepecz
    See : I first go to setting of compare yith in admin and in setting tab , disable option of : “Show button in single product page”
    like this pic :
    pic :

    And then I add this code in functions.php in my template :

    function yith_wcwl_move_compare(){
        echo do_shortcode( '[yith_compare_button]' );
    }
    add_action( 'woocommerce_single_product_summary', 'yith_wcwl_move_compare', 55 );

    I hope it works for you !

    oh you using premium version :/ i have free now ??

    Thread Starter mahtabpi

    (@mahtabpi)

    Hi pepecz

    If you mean version of compare yith , I use free now , too !

    Rregards

    And know someone how disable show Compare Button/Link
    in Releated Products on product page?

    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    you can try to use this code snippet, add this on your theme’s functions.php and let me know.

    add_filter( 'yith_woocompare_remove_compare_link_by_cat', 'yith_remove_compare_from_related', 20, 2 );
    function yith_remove_compare_from_related( $res, $product_id ) {
    	global $woocommerce_loop;
    
    	return isset( $woocommerce_loop['name'] ) && $woocommerce_loop['name'] == 'related';
    }

    Regards ??

    Hi,

    I need a compare button below the product image, currently its coming below the short description.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change location of compare yith in product page’ is closed to new replies.