Last active
March 17, 2023 22:55
-
-
Save Acephalia/46f22c1045e20a8107b0b9c54c30b94f to your computer and use it in GitHub Desktop.
Show Variations On Woocommerce Shop Page
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
/* Variation drop down will need to be styled to match theme. Use this as a starting point. */ | |
li.product-type-variable td { | |
float: left; | |
} | |
#main li.product input { | |
float: none; | |
} |
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
//Show Variations On Shop Page | |
add_action( 'woocommerce_before_shop_loop', 'another_handsome_bearded_guy_select_variations' ); | |
function another_handsome_bearded_guy_select_variations() { | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 30 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment