Title: stylesheet_uri
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘stylesheet_uri’, string $stylesheet_uri, string $stylesheet_dir_uri )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#wp--skip-link--target)

Filters the URI of the active theme stylesheet.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#parameters)󠁿

 `$stylesheet_uri`string

Stylesheet URI for the active theme/child theme.

`$stylesheet_dir_uri`string

Stylesheet directory URI for the active theme/child theme.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/theme.php#L263)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/theme.php#L263-L263)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#related)󠁿

| Used by | Description | 
| [get_stylesheet_uri()](https://developer.wordpress.org/reference/functions/get_stylesheet_uri/)`wp-includes/theme.php` |

Retrieves stylesheet URI for the active theme.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#changelog)󠁿

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/stylesheet_uri/?output_format=md#comment-content-854)
 2.   [WP SITES](https://profiles.wordpress.org/wordpresssites/)  [  11 years ago  ](https://developer.wordpress.org/reference/hooks/stylesheet_uri/#comment-854)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fstylesheet_uri%2F%23comment-854)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fstylesheet_uri%2F%23comment-854)
 4. **Use a custom stylesheet for single posts.**
 5.     ```php
        /**
         * Use a custom stylesheet for single posts.
         *
         * @param string $stylesheet     Original stylesheet URI.
         * @param string $stylesheet_dir Stylesheet directory.
         * @return string (Maybe modified) stylesheet URI.
         */
        function wpdocs_custom_stylesheet_for_single_posts( $stylesheet, $stylesheet_dir ) {
    
        	if ( is_singular( 'post' ) ) {
        		$stylesheet = $stylesheet_dir . '/custom-single.css';
        	}
    
        	return $stylesheet;
        }
        add_filter( 'stylesheet_uri', 'wpdocs_custom_stylesheet_for_single_posts', 10, 2 );
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fstylesheet_uri%2F%3Freplytocom%3D854%23feedback-editor-854)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fstylesheet_uri%2F)
before being able to contribute a note or feedback.