-
AuthorPosts
-
March 6, 2016 at 3:16 am #593832
Hi, I’m having trouble getting the enfold-child style.css to work properly (with our without using !important). Custom CSS code I add in the Quick CSS works fine. For example, I want to hide the logo on the home page using this: #header_main .logo {display: none;} – works fine in Quick CSS but not in style.css.
March 8, 2016 at 4:26 am #594750Hey tzaroban!
Thanks for reaching out with your question.
The style.css stylesheet is only in the theme folder for WordPress to recognize basic theme data like the name and version of the theme. Therefore CSS rules in this file are not be used by the theme which is why the CSS code you put in the style.css file for the child theme does not work. Instead the custom.css file that is located in your themes /css/ folder is used to add your styles. You can create a similar directory in your child theme such as /css/custom.css to add your CSS code and then call that file in the child theme’s function.php file using:
require_once( get_stylesheet_directory() . '/css/custom.css' );
Let me know if this helps or if you have any further questions.
Cheers!
JordanMarch 8, 2016 at 4:53 pm #595058Thanks for assisting. I followed your instructions but the custom.css is still not loading – instead it appears as raw code at the top of every page. Please advise.
March 12, 2016 at 7:03 am #597144Hi!
I added a custom css in the style.css file and then checked it in the frontend, the actual file is empty. It’s like the file is being cached. I then noticed that you have tons of plugin installed. Please try to deactivate all plugins or remove those that you don’t need then test the style.css file again.
Best regards,
IsmaelMarch 17, 2016 at 8:15 pm #599931I’ve deactivated most of the plugins, still don’t see any changes to the child style.css taking effect. Any other ideas?
March 21, 2016 at 6:02 am #601021Hi!
Why did you install the layer slider plugin? It is already included in the theme so you don’t have to install it. How did you disable the default? I’m asking because you might have done a few modifications to the theme that we don’t know of.
Best regards,
IsmaelMarch 21, 2016 at 5:33 pm #601392I didn’t, it was already installed for another theme. I’m switching a client’s site to a new theme so all the Plugins were migrated from the old site. I haven’t made any other changes to the Enfold theme whatsoever. Looks like you’ve deactivated the extra LayerSlider plugin now but I still don’t see any styles.css working.
March 21, 2016 at 5:38 pm #601398And now I can’t get the @font-face styles working for h2 styles.
March 24, 2016 at 4:32 am #602876Hey!
What is the old theme? I checked the style.css file again and the changes I created are now added.
/* Theme Name: Huber Financial Custom Theme Description: A <a href='http://codex.wordpress.org/Child_Themes'>Child Theme</a> for the Enfold WordPress Theme. If you plan to do a lot of file modifications we recommend to use this Theme instead of the original Theme. Updating wil be much easier then. Version: 1.0 Author: Zaroban Design Author URI: http://www.zarobandesign.com Template: enfold */ /*Add your own styles here:--*/ .test { display: none; }
Regards,
IsmaelMarch 24, 2016 at 7:01 pm #603350The old theme was deleted, it was called BUILDER by iThemes. This is driving me crazy… sometimes adding css to styles.css works and sometimes it doesn’t. I copied code to hide categories in the home page post slider and it works. I cut-pasted the rest of the css from the Quick CSS field and it doesn’t work. Then added a new line of css to styles.css to hide the header and it doesn’t work. Almost acts like a caching issue but there’s no caching plugin installed and delete the browser cache repeatedly. Any way to escalate this problem?
March 24, 2016 at 7:32 pm #603360Followup: It’s gotta be a caching issue, now 15 minuted later the test code in the styles.css is working (making the header disappear). Of course deleting that code doesn’t take effect immediately either. Could be browser related bc checking same page in Chrome show’s the header is visible. Been using Mac Firefox… Grrrrr.
March 25, 2016 at 10:10 pm #603730Hi!
Well, at least it gotted short out.
Please do let us know if you need anything else, we will be more than happy to assist!Best regards,
Basilis -
AuthorPosts
- The topic ‘Child theme style.css not loading’ is closed to new replies.