template WordPress Filter Hook

This hook is used to add custom code to the top of the header.php template file in a WordPress theme. This is useful for adding code that needs to be output before anything else in the header, such as CSS style rules or JavaScript code.

apply_filters( 'template', string $template ) #

Filters the name of the active theme.


Parameters

$template

(string)active theme's directory name.


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