Created
May 19, 2017 14:52
-
-
Save jmabbas/735eb01d9aefaec818cf1abdcb74e86b to your computer and use it in GitHub Desktop.
electro replacement of add to cart to compare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_loaded', 'el_custom_wp_loaded'); | |
function el_custom_wp_loaded() { | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
remove_action( 'electro_loop_action_buttons', 'electro_add_to_compare_link', 20 ); | |
remove_action( 'electro_product_card_view_body', 'woocommerce_template_loop_add_to_cart', 70 ); | |
} | |
add_action( 'woocommerce_after_shop_loop_item', 'electro_add_to_compare_link', 10 ); | |
add_action( 'electro_product_card_view_body', 'electro_add_to_compare_link', 70 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.product a.add-to-compare-link { | |
font-size: 0px; | |
} | |
.product a.add-to-compare-link:before { | |
font-size: 19px; | |
vertical-align: bottom; | |
background-color: #e6e6e6; | |
border-radius: 50%; | |
padding: 7px; | |
color: white; | |
font-weight: 700; | |
} | |
.product:hover a.add-to-compare-link:before { | |
background-color: #fed700; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment