wp_head()

Fire the wp_head action.


Description Description

See ‘wp_head’.


Source Source

File: wp-includes/general-template.php

2740
2741
2742
2743
2744
2745
2746
2747
function wp_head() {
    /**
     * Prints scripts or data in the head tag on the front end.
     *
     * @since 1.5.0
     */
    do_action( 'wp_head' );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by hearvox

    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 closing tag of your theme (usually in header.php):

    1
    2
    3
    4
    <head>
        <!-- First add the elements you need in <head>; then last, add: -->
        <?php wp_head(); ?>
    </head>

You must log in before being able to contribute a note or feedback.