Overriding woocommerce styles #200
Unanswered
andreaslyngstad
asked this question in
Q&A
Replies: 2 comments
-
hi @andreaslyngstad add_action('wp_enqueue_scripts', 'my_theme_enqueue_scripts', 15); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Thanks for answering. I did solve this. I do not remember how. You solution is valid and would work. Andreas |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am adding woocommerce to a site. The shop is not the main focus of the site. So, I do not want to write all the views for woocommerce. I would like to override some of the styling.
The problem is that the woocommerce css files are loaded after the custom.css file I edit in the resources folder.
I have tried to enqueue the files in different ways in the functions.php file.
I guess that I could do it in this function, nothing has worked
function my_theme_enqueue_scripts() { $theme = wp_get_theme(); wp_enqueue_style( 'tailpress', skogselskapet_asset( 'css/app.css' ), array(), $theme->get( 'Version' ) ); wp_enqueue_script( 'tailpress', skogselskapet_asset( 'js/app.js' ), array(), $theme->get( 'Version' ) ); }
When I do this
add_filter( 'woocommerce_enqueue_styles', '__return_false' );
The woocommerce styling disappears, but then I have to style every element (I can't be bothered). I just need to change som fonts and colors.
How can I enqueue the woocommerce stylesheets before the custom.css file?
Thanks!
Andreas
Beta Was this translation helpful? Give feedback.
All reactions