Support » Themes and Templates » style.css file in a folder

  • Resolved Gaurav


    Hi Guys,

    Can someone guide if i move the style.css in a folder from the root i am unable to activate the theme from the admin.

    So what code should i add to header.php so it picks up the style.css and activate the theme properly.

    As per Theme Development Standards wordpress requires that the style.css file should be on the root we had to move the file on the root.

    As you know in wordpress the style.css file in on the root.


Viewing 11 replies - 1 through 11 (of 11 total)
  • The Theme’s style.css file must be in the Theme root directory. So, for “My Test Theme”, the root folder is:


    And the style.css file must be here:




    So Chip, there is no way i can have the style.css in a folder?

    Not as far as I know.

    What are you trying to accomplish, that you need/want to move the style.css file into a sub-folder from the Theme root?



    Yes, in one of my project the client is asking for this.

    That the style.css should be in a folder and not on root.

    To what “root” are you referring: the Theme root, or the site/WordPress root?



    When we try to move the css file the theme does not activate.

    From what i know the style.css should on the root of the theme folder, otherwise the theme will not activate.



    By root i mean the theme folder root.

    for e.g my theme folder name is “abc”

    and i wan that the style.css should be in a folder named “css”

    So the css folder will be in me “abc” folder.



    So the folder will be:-


    Why is your client asking for this?

    Again: as far as I know, the style.css file must be in the Theme root.

    You can put other CSS files into a sub-folder, but not style.css.



    ok, will do that and import all the other css files in to style.css.

    Thanks for the help

    i agree, you must have the style.css file with the neccessary theme information in the theme root folder;
    however, imho, and as @chip Bennett already said, you can have as many other folders with css files as you like, and there is no reason why these css files cannot be named style.css as well;

    /wp-content/themes/abc/style.css (this is the neccessary style.css to get the theme recognized)


    as long as you link these css files properly from the header;
    and you don’t even have to link the style.css in the theme root.

    there are actually many themes that do this.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘style.css file in a folder’ is closed to new replies.