Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Last active January 4, 2021 07:10
Show Gist options
  • Save claudiosanches/9d37db6d5751f01036e5 to your computer and use it in GitHub Desktop.
Save claudiosanches/9d37db6d5751f01036e5 to your computer and use it in GitHub Desktop.
WooCommerce Custom CSS
<?php
function my_theme_woocommerce_enqueue_styles( $styles ) {
$base_url = str_replace( array( 'http:', 'https:' ), '', get_stylesheet_directory_uri() ) . '/inc/woocommerce/css/';
$styles['woocommerce-layout']['src'] = $base_url . 'woocommerce-layout.css';
$styles['woocommerce-smallscreen']['src'] = $base_url . 'woocommerce-smallscreen.css';
$styles['woocommerce-general']['src'] = $base_url . 'woocommerce.css';
return $styles;
}
add_filter( 'woocommerce_enqueue_styles', 'my_theme_woocommerce_enqueue_styles' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment