Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Modify location of main stylesheet
* Modify location of main stylesheet
* N.B.: style.css in the theme's root is still needed to provide WordPress
* with the necessary metadata about the theme
* @author Alain Schlesser (
* @param string $stylesheet_uri Stylesheet URI for the current theme/
* child theme
* @param string $stylesheet_dir_uri Stylesheet directory URI for the current
* theme/child theme
* @return string modified Stylesheet URI
* @see
* @see
function as_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri ) {
return $stylesheet_dir_uri . '/assets/styles/theme.css';
add_filter( 'stylesheet_uri', 'as_stylesheet_uri', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.