[wp-hackers] wp_head()

Eric Mann eric at eam.me
Fri Nov 19 18:12:43 UTC 2010


wp_head() defines a the hook used by plug-ins and themes to add information
to the header.  WordPress kicks in a long time before header.php is even
loaded.

When you visit a site, you're visiting the index.php file in the root, which
loads WordPress and processes the query.  Then WordPress loads the index.php
file for your theme and that file calls get_header() which loads header.php.
 You're already a long way down the pipe by now and have access to just
about everything and every function defined by WordPress.

WordPress decides what the current page is before picking the theme.  This
is when WordPress decides whether to call your theme's index.php (general
requests), single.php (individual posts), page.php (pages), etc.

On Fri, Nov 19, 2010 at 9:51 AM, Haluk Karamete <halukkaramete at gmail.com>wrote:

> Hi,
>
> Before the header.php runs wp_head(), information such as the current
> page's title can be outputted... How is this possible? I thought, wp
> kicks in with the wp_head()!
>
> Also, what file or function figures out whether the current page is a
> single, category, tag, 404 etc.. Is that done before the ball is
> passed to the theme? or is it done at .htaccss/web.config time?
>
> Thx.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list