Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[Theming Snippets] Enqueue your own stylesheet
* Enqueue your own stylesheet
function wp_enqueue_woocommerce_style(){
wp_register_style( 'mytheme-woocommerce', get_template_directory_uri() . '/css/woocommerce.css' );
if ( class_exists( 'woocommerce' ) ) {
wp_enqueue_style( 'mytheme-woocommerce' );
add_action( 'wp_enqueue_scripts', 'wp_enqueue_woocommerce_style' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment