1

According the Wordpress' doc, when we create theme, we need to create style.css file in the same place with other files like header.php, footer.php, however, to make a better organization of files, I put all css files in a sub folder.

Then there comes the problem, when I go to the admin area, Appearance -> Editor, I can not see the sub folder so can not edit those css file in the sub folder.

Please help, thanks.

3 Answers 3

2

create style.css on your theme folder and have it's content:

/*
Theme Name: Your theme name
Theme URI: http://example.com/
Description: Your theme description
Author URI: http://example.com/
*/

@import('themesubfolder/yourfile.css');
Sign up to request clarification or add additional context in comments.

Comments

1

There seems to be a problem in WordPress (still existing at version 3.3.1 as far as I can tell) where CSS files in a sub directory of a child theme are not recognized. For me, the problem isn't only with not seeing such files in the "editor." CSS files that are in subdirectories simply do not work.

Yes, you can use @import in your main CSS file to include another CSS file that's in the child theme's directory, but it must be at the same level as the main CSS file. After several hours of frustrating experimentation, my conclusion is: CSS files that are in a sub folder of a child theme are ignored.

Comments

1

Do one thing, delete old CSS file and replace it with new CSS file, if you have two-three CSS then d'nt worry about that, place other CSS file with Header.php, footer.php, index.php...

Call that CSS file with "/FILE NAME"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.