Change style for custom button
-
Hi,
I added a “Continue Shopping” button on my Cart page:
add_action( 'woocommerce_after_cart_totals', 'cart_continue_shopping_button' ); function cart_continue_shopping_button() { echo '<div class="">'; echo ' <a href="'.home_url().'" class="button">Seguir comprando →</a>'; echo '</div>'; }I want to change the style of the button using CSS:
add_action( 'wp_head', function () { ?> <style> .button { width: 553px; text-align: center; background: orange; } </style> <?php } );My question is how to I set a name to that button so that I can reference it in the CSS code? Right now by using
.buttonI’m changing the style of all the buttons on my page.Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Change style for custom button’ is closed to new replies.