id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 38910 `is_post_type_archive()` return true when the current page is tag archive yaquawa "See if you register a post type ""fruit"". And you have a tag ""sample-tag"". When you access: http://localhost/tag/sample-tag/?post_type=fruit You'll be taken to the post type archive page(template) rather than the tag archive page even the URL is telling you this is a tag archive page. This is because the `is_post_type_archive()` is called earlier than `is_tag()` in `wp-includes/template-loader.php`. It should never depend on the order of condifional functions be called, I believe this is a serious bug. `is_post_type_archive()` should return false when the current page is NOT a post type archive page. To get a stricter result of `is_post_type_archive()`, it should check if the current `queried_object` is a WP_Post type or not. If you are viewing a tag archive, the `queried_object` is an instance of `WP_Term` , obviously, this is NOT a ""post type archive"" page at all." defect (bug) closed normal General 4.6.1 normal worksforme reporter-feedback close template