Sub folder CSS that’s read by Admin panel

I’m in the process of creating a theme that will have several different setup options based on input from the administrator. One of the options will be to have a Zurb or Basic type layout.

I’m working with SCSS and want to have my stylesheets in a separate sub folder from the main theme files, cleanliness aside this is the easiest way for me to build/upload the files using my configuration of Sublime Text. I’ve been able to accomplish this easily enough and tell WP where to find the CSS folders for the specific setups. But WP STILL requires me to have a style.css document in the root of the theme or the admin panel will tell me the theme is broken. I realize this is due to WP looking for the Theme Header information located in the style.css/index.php files. Is there a way to tell WordPress to look else where for the Theme Header info?

Read More

I know you can @import the CSS files into this main style.css easily enough. I however would prefer that the style.css file in the main folder not exist entirely.

Is there a function call / hook / filter / ect. that can be used to tell the WP admin panel that the main template/stylesheet files are actually in a different sub folder? All of the other articles I’ve read on the subject will explain how to do the @import feature into the main style.css file, or suggest using stylesheet_directory_uri();. Both of these methods still require you to have a style.css in the root folder. I haven’t seen a suggestion that actually addresses forcing WP to handle it differently.

Even if this means editing the core (which is something I normally would never do) I’m fine with that. I just want to know how. The solutions I mentioned above will solve my problem if all else fails.

Related posts

Leave a Reply

2 comments

  1. There’re lots of filters available, The one I found in get_stylesheet_directory_uri () function is – stylesheet_directory_uri (wp-includes/theme.php#L166)

    Example –

        add_filter('stylesheet_directory_uri','wpse62567_stylesheet_dir');
        function wpse62567_stylesheet_dir($stylesheet_dir_uri, $theme_name){
            return $stylesheet_dir_uri . '/new-dir';
        }