CSS Tricks – Remove the Outline for Add-to-Cart Button
So I am trying to call a shortcode(add_to_cart) that Woocommerce already built for one of my projects today. What WordPress function did I use? I used the “do_shortcode” function.
First I created a WP_Query object so I can get customize queries to pull data from WordPress database.
$the_query = new WP_Query($args);
Then I called the add_to_cart inline shortcode.
$content.=do_shortcode(‘[add_to_cart id=’.$the_query->post->ID.’]’);
I realized those add to cart button I just added are having ugly border line. Like this:
Checked the css file and added couple css lines to the style.css in my theme folder, and border is removed.
.product.woocommerce.add_to_cart_inline {
border: 0 !important;
}
Please submit a comment if you have questions or better ways to fix this issue.