LittleBizzy

Dominate technical SEO with a SlickStack cloud server for just $39/month!  Order Now

the little known “add to cart” shortcode for WooCommerce

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42410
    Vincent
    Guest

    guys I have used this on a few projects and I’m telling you it’s gold especially if you’re using custom WordPress themes or widgets or just want to manually insert an order button somewhere on your site that is not a typical WooCommerce product page:

    [add_to_cart id="12345"]

    note the id number is the id of the Woo product!

    #42411
    Frank
    Guest

    btw you can also control styling by removing the default border or things like that too with inline CSS rules

    [add_to_cart id="454654" style="border: none; padding: 0;"]

    #42412
    Brandon
    Guest

    I literally never knew this before. Fantastic.

    #42413
    Ryan
    Guest
    #42414
    Louis
    Guest

    you can also hide the price if you don’t need to show it, and want to put the price manually or anything:

    [add_to_cart id="63663" show_price="false" style="border: none; padding: 0;"]

    I usually hide it, because it’s a bit goofy imo

    or, you can add more custom CSS to your site to make it look better.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: the little known “add to cart” shortcode for WooCommerce