This topic has 6 replies, 2 voices, and was last updated 6 years, 6 months ago ago by Rose Tyler
Hi,
I use the child theme but it doesn’t work I tried to add few codes to style.css file and uploaded to server on child theme folder but it doesn’t work even to dynamic.css I cant find any change in the website.
Hello,
Custom css should work fine from Theme Options > Custom css or style.css of the child theme.
Have you cleared cache after adding the code?
Please provide us with the code you added and site URL.
Regards
Hi Yes of course, I do clear the cash and I use different browsers.
In the attached file a screenshot for all details
Function.php file
———————
<?php add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array( ‘bootstrap’, ‘parent-style’ ) );
wp_enqueue_style( ‘dynamic-css’, get_stylesheet_directory_uri() . ‘/dynamic.css’ );
}
Dynamic.css file
—————–
.header-top {
background-color: #f80e0e;
}
Style.css file
—————-is empty since I heard to use dynamic for more fast loading pages
Also I have a question I have WMPL plugin to translate my website what if I want to use a custom CSS file for the translated language child theme how my code should be? and where to add the file.
Thanks
.
You do not need to edit dynamic.css file, this file is used automatically once you add custom css in Theme Options. If you want to add the code in css file directly, please, use style.css file of the child theme.
Also, change your code to:
.header-type-17 .header-top {
background-color: #f80e0e;
}
Also I have a question I have WMPL plugin to translate my website what if I want to use a custom CSS file for the translated language child theme how my code should be? and where to add the file.
– simply add custom css code in style.css file of your child theme. Or do you mean that the custom code should affect not all site but only 1 language?
Regards
Hi thank you
I Do exactly as you mention before nothing has been updated I really want to know why this happened now the dynamic file is empty and style.css file has this code
.header-type-17 .header-top {
background-color: #f80e0e;
}
Nothing has been changed.
– For the custom css code for language. Yes custom code affect on one language what do to ? thanks
Hello,
1. Please clear cache and check one more time https://prnt.sc/jxgk3s
2. Add custom css code in style.css file of child theme, but like in this example:
html[lang="en-US"] body header {
background: red !important;
}
Regards
You must be logged in to reply to this topic.Log in/Sign up