[wp-hackers] get_header hook runs twice for me.
halukkaramete at gmail.com
Thu Feb 28 01:47:26 UTC 2013
I got this
When I go visit an archive a page, I see that the get_context runs twice. I
know it runs twice because I see my name repeated twice in between the
Anyway, in the first run, I get the wp_query output in a ,very limited and
useless fashion. It's limited and got no data in it, something like this;
[query_vars] => Array
[post_count] => 0
[current_post] => -1
[comment_count] => 0
[current_comment] => -1
[found_posts] => 0
[max_num_pages] => 0
[max_num_comment_pages] => 0
... some more is_this and is_that... cut for brevity.
[query_vars_changed] => 1
As you see even the found_posts comes up as 0.
In the second running though, I I get all the context one can wish for in
regards to the current page.
Including the correctly calculated [found_posts] data.
Why is that? Why am I getting this action hook runs twice?
More information about the wp-hackers