• Resolved db151

    (@moddingrepair)


    hello can you help me how to add the add button to the wish list next to the add to cart button? on the single product page. thank you very much sending screen as I want to insert it

    link image : https://postimg.cc/MX3j6cpb

    • This topic was modified 2 years, 7 months ago by db151.
Viewing 1 replies (of 1 total)
  • I am not sure how reliable this is… but you can try these 2 combinations

    Before following the below steps make sure you have cpanel incase if your site crashes.

    Step 1 – Adding content after add to cart button on woocommerce single page

    add_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart_button_func' );
    /*
     * Content below "Add to cart" Button.
     */
    function add_content_after_addtocart_button_func() {
    
            // Echo content.
            echo '<div class="second_content">Other content here!</div>';
    
    }

    2) Add this shortcode [ti_wishlists_addtowishlist] anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product.

    Final code:

    add_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart_button_func' );
    /*
     * Content below "Add to cart" Button.
     */
    function add_content_after_addtocart_button_func() {
    
            // Echo content.
            echo '<div class="second_content">[ti_wishlists_addtowishlist]</div>';
    
    }

    If the wishlist button comes below the add to cart button, you might to do some CSS.
    That’s all. Hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘add Wishlist right add to cart button’ is closed to new replies.