Where ‘style-woocommerce’ is the ID of your stylesheet and get_stylesheet_directory_uri().’/style-woocommerce.css’ is your .css DIR.
wp_register_style( 'style-woocommerce', get_stylesheet_directory_uri().'/style-woocommerce.css' ); wp_enqueue_style( 'style-woocommerce' );
Function below is for woocommerce page css only. This will show on woocommerce pages else is not.
add_action( 'wp_enqueue_scripts','home_scripts' ); function home_scripts(){ If( is_shop() || is_product_category() || is_product() ){ wp_register_style( 'style-woocommerce', get_stylesheet_directory_uri().'/style-woocommerce.css' ); wp_enqueue_style( 'style-woocommerce' ); } }
Leave a Reply