Fires the wp_head action.
Description
See ‘wp_head’.
Source
function wp_head() {
/**
* Prints scripts or data in the head tag on the front end.
*
* @since 1.5.0
*/
do_action( 'wp_head' );
}
View all references View on Trac View on GitHub
Hooks
- do_action( ‘wp_head’ )
Prints scripts or data in the head tag on the front end.
Related
| Uses | Description |
|---|---|
do_action()wp-includes/plugin.php | Calls the callback functions that have been added to an action hook. |
| Used by | Description |
|---|---|
WP_REST_Widget_Types_Controller::render_legacy_widget_preview_iframe()wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php | Renders a page containing a preview of the requested Legacy Widget block. |
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |
Example. Plugins and WordPress core use this function to insert crucial elements into your document (e.g., scripts, styles, and meta tags). Always put
wp_head()just before the closingtag of your theme (usually inheader.php):Add a pingback url auto-discovery header for single posts, pages, or attachments.