function get_theme_root_uri( $stylesheet_or_template = false ) {}

Retrieve URI for themes directory.
Does not have trailing slash.


  • string $stylesheet_or_template: The stylesheet or template name of the theme

Return values

returns:Themes URI.

Defined filters

  • theme_root_uri
    apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl')

Source code

function get_theme_root_uri( $stylesheet_or_template = false ) {

	if ( $stylesheet_or_template ) {

		if ( $theme_root = get_raw_theme_root($stylesheet_or_template) )

			$theme_root_uri = content_url( $theme_root );


			$theme_root_uri = content_url( 'themes' );

	} else {

		$theme_root_uri = content_url( 'themes' );


	return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: