WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/wp head

Contents

Description

Fire the 'wp_head' action. Put this template tag immediately before </head> tag in a theme template (ex. header.php, index.php).

Usage

 <?php wp_head(); ?> 

Parameters

This function does not accept any parameters.

Return values

None.

Examples

In twentyten theme

wp-content/themes/twentyten/header.php:

<?php 
 ...
    /* Always have wp_head() just before the closing </head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such
     * as styles, scripts, and meta tags.
     */
    wp_head();
 ?>
 </head>

Notes

Changelog

  • Since: 1.2.0

Source File

wp_head() is located in wp-includes/general-template.php.

Related

See also index of Function Reference and index of Template Tags.

See also