style.css in css directory (i.e. not in theme root)

I’m new to WordPress and this is my first attempt to migrate a static website to WordPress. The websites layout must remain unchanged so I intend to develop a theme for it.

I’m used to having css files in the css directory, but the WordPress Theme Development page states that there has to be a style.css in the theme root.

Read More

Can I setup WP to get css/style.css instead? What is the recommended way to organise css files in WP?

Related posts

Leave a Reply

1 comment

  1. You can use WordPress’ wp_enqueue_style.

    function addMyScript() {
    wp_enqueue_style( 'my-style', get_template_directory_uri() . '/css/my-style.css', false, '1.0', 'all' );
    }
    add_action('wp_head', 'addMyScript');
    

    Just remember that you still need to have a style.css inside your theme root, even if it only has the details about the Theme in the form of comments.

    Please refer to: http://codex.wordpress.org/Function_Reference/wp_enqueue_style