[wp-hackers] get_header hook runs twice for me.

Andrew Nacin wp at andrewnacin.com
Thu Feb 28 04:27:05 UTC 2013

On Wed, Feb 27, 2013 at 8:47 PM, Haluk Karamete <halukkaramete at gmail.com>wrote:

> Why is that? Why am I getting this action hook runs twice?

Some themes call get_header() more than once. Accidentally, of course,
usually by a bad copy-paste or when the theme is hacked together. Core does
a require_once in this situation, which means no obvious change, making
this tough to spot. However, the action hook would fire both times.

Check your theme. Try this on any default theme (Twenty Ten through
Thirteen) and you aren't likely to see this issue.


More information about the wp-hackers mailing list