C
C
colorkid2017-07-02 09:03:41
WordPress
colorkid, 2017-07-02 09:03:41

How to remove links to default style files in wordpress/woocomerce?

Hello. Such a story.
There is a wordpress + woocommerce store, I created the theme from scratch, all styles are in a separate css file, BUT default links to default css from woocommerce remain in the header automatically like
woocommerce-layout.css
woocommerce-smallscreen.css
woocommerce.css
And I have them and no, I want to remove these links from the header. How to do this please tell me...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
colorkid, 2017-07-02
@colorkid

immediately found the answer. If anyone needs it, write it in the file function
function wpex_remove_woo_styles( $styles ) {
unset( $styles['woocommerce-general'] );
unset( $styles['woocommerce-layout'] );
unset( $styles['woocommerce-smallscreen'] );
return $styles;
}
add_filter( 'woocommerce_enqueue_styles', 'wpex_remove_woo_styles' );

M
marataziat, 2017-07-02
@marataziat

In themes/<style name>/header.php there you need to understand :3

I
Igor Vorotnev, 2017-07-07
@HeadOnFire

So everything is written in the docs :

add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question