wp_head()
Fires the wp_head action.
Description
See ‘wp_head’.
Source
File: wp-includes/general-template.php
.
View all references
function wp_head() {
/**
* Prints scripts or data in the head tag on the front end.
*
* @since 1.5.0
*/
do_action( 'wp_head' );
}
Hooks
- do_action( 'wp_head' )
-
Prints scripts or data in the head tag on the front end.
Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
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 in
header.php
):Add a pingback url auto-discovery header for single posts, pages, or attachments.