Home › Forums › WoodMart support forum › Child theme Style.css not working
Child theme Style.css not working
- This topic has 7 replies, 2 voices, and was last updated 4 years ago by Aizaz Imtiaz Awan.
-
AuthorPosts
-
December 21, 2020 at 2:39 am #252620
katypParticipantHey,
I have installed the child theme and everything is working fine, the functions.php in child theme is being executed & the website works fine.
I had some code in my Appearance-> Additional CSS. But when I move that code to my child theme/style.css then it does not work
Any help?
December 21, 2020 at 8:28 am #252669
Aizaz Imtiaz AwanKeymasterHello,
You should go to Theme Settings >> Custom CSS and paste the Custom CSS code in the particular section from where you want to apply the custom CSS code. This custom CSS, you will never lose after the theme update.
Best Regards.
December 21, 2020 at 8:46 am #252677
katypParticipantYes that’s fine but how do I add it to my style.css
And why is the style.css not loading the code I am adding in thereDecember 21, 2020 at 9:18 am #252693
Aizaz Imtiaz AwanKeymasterHello,
Can you please send me the code which is not working after adding in the Style.css file also, please share the WP admin login details of your site so I will check and give you the possible solution.
Best Regards.
December 22, 2020 at 3:08 am #252939
katypParticipantHey,
Unfortunately it would be tough to share the credentials. But I’ll attach the screenshots to make it more clear.
The CSS I am adding to the child theme does not work as shown in the screenshot “child-theme”. (Doesn’t matter what code I add, whatever css rules I add aren’t read)
But the same code works fine if I add it in the Appearance-> Customize -> Additional CSS
How can I make the child theme style.css work? I see that it’s Enqueued in the functions.php as well.
Attachments:
You must be logged in to view attached files.December 22, 2020 at 6:20 am #252955
Aizaz Imtiaz AwanKeymasterHello,
I saw the screenshot you attached.
It seems that you’re not enqueuing the stlye.css file correctly that’s why it’s not working. Please try enquing the style.css again then clear cache and check back.
You can read the following article for further help:
https://developer.wordpress.org/themes/advanced-topics/child-themes/If you are still unable then it is necessary for you to provide me with admin panel login details of the website to check it myself and help you out accordingly.
Regards.
Xtemos Studios.December 22, 2020 at 9:04 am #252994
katypParticipantThis is the code that’s present in my child theme’s functions.php
/** * Enqueue script and styles for child theme */ function woodmart_child_enqueue_styles() { wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) ); } add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 10010 );
December 22, 2020 at 10:27 am #253031
Aizaz Imtiaz AwanKeymasterHello,
I saw the screenshot you attached.
Please provide the admin panel login details of the website to check it myself and help you out accordingly.
Regards.
Xtemos Studios. -
AuthorPosts
Tagged: child-theme, css, style
- You must be logged in to create new topics. Login / Register