stylesheet_directory WordPress Filter Hook

The stylesheet_directory hook is a great way to add custom CSS to your WordPress site. This hook allows you to specify a directory for your custom CSS files, which will be loaded after the default WordPress CSS files. This means that your custom CSS will override any default WordPress CSS styles, giving you complete control over the look and feel of your site.

apply_filters( 'stylesheet_directory', string $stylesheet_dir, string $stylesheet, string $theme_root ) #

Filters the stylesheet directory path for the active theme.


Parameters

$stylesheet_dir

(string)Absolute path to the active theme.

$stylesheet

(string)Directory name of the active theme.

$theme_root

(string)Absolute path to themes directory.


Top ↑

Source

File: wp-includes/theme.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More