{"id":3943104,"date":"2013-07-19T03:17:00","date_gmt":"2013-07-19T03:17:00","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/query-hooked-in-header-as-main-query\/"},"modified":"2016-08-21T03:04:56","modified_gmt":"2016-08-21T03:04:56","slug":"query-hooked-in-header-as-main-query","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/query-hooked-in-header-as-main-query\/","title":{"rendered":"Query Hooked in Header as Main Query"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I&#8217;m having trouble with WordPress SEO and one of my plugins.<\/p>\n<p>My plugin hooks a function on the_content(), and the first thing done in this function is to check is the current query is_main_query(). However, WordPress SEO seems to trigger a query in WordPress header (on the wp_head() action) which is identified as a main query.<\/p>\n<p>The result, as you can immagine, is that my function is hooked in the header of the site and in the real content part.<\/p>\n<p>Could you please tell me what exactly is hooked on wp_head() as a main query?<\/p>\n<p>Cheers,<br \/>\nJulien<\/p>\n<p>https:\/\/wordpress.org\/extend\/plugins\/wordpress-seo\/<\/p>\n","protected":false},"template":"","class_list":["post-3943104","topic","type-topic","status-closed","hentry","topic-tag-hook","topic-tag-main-query","topic-tag-wp_head"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3943104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3943104\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3943104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}