Website Building » WooCommerce » Adding an Icon to Your WooCommerce Add to Cart Buttons Can Be Done Easily With Some Custom CSS….So, How Can I Add Icons to the WooCommerce Buttons?

Adding an Icon to Your WooCommerce Add to Cart Buttons Can Be Done Easily With Some Custom CSS….So, How Can I Add Icons to the WooCommerce Buttons?

Last updated on January 12, 2023 @ 2:34 pm

Adding an icon to your WooCommerce add to cart buttons can be done easily with some custom CSS. Here’s how:

First, you’ll need to add the following CSS to your child theme’s stylesheet:

WooCommerce a.button.add_to_cart_button:before {
  content: "\f07a";
  font-family: FontAwesome;
  padding-right: 0.5em; }

This will add a Font Awesome icon before the text on your add to cart buttons. You can change the icon by changing the content value (e.g. content: “\f015”; for a home icon).

If you want to style the text on your buttons differently, you can use the following CSS:

add_to_cart_button {
  text-transform: uppercase;
  font-weight: bold; }

This will make the text on your add to cart buttons uppercase and bold.

PRO TIP: Adding an icon to your WooCommerce add to cart buttons can be done easily with some custom CSS. However, you should be aware that this can potentially break your site if not done correctly. We recommend that you only attempt this if you are comfortable with editing code and know what you are doing.
Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.