Detecting post type within init action
OK, let’s get some thing staight first. Here is list of actions run during typical request. It goes like this: … init … parse_request … parse_query pre_get_posts posts_selection … wp As you can see, posts are selected much later after init. To be more precise, even the request is parsed after init hook. So there … Read more