Archived topic
Avoid loading style.css of the child theme
3 replies · Started by Kaleem on May 6, 2020
Hi, my child theme’s style.css file is empty and I want to avoid loading it.
I followed this tutorial: https://docs.generatepress.com/article/using-child-theme/#avoid-loading-style-css-of-the-child-theme
found this code `add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'generate-child' );
}, 50 );`
I just want to know two things about the code:
1. am I pasting the code to functions.php?
2. do I need to change ( 'generate-child' ) to march the name of my child theme?
Thank you.
Hi there,
1. Yes
2. No I don't believe so. Try it with generate-child first.
Let me know :)
Great! the generate-child did the job.
Thank you, sir.
No problem :)