This is not a bug that I have heard of so I would make sure you do not have a plugin or some other code filtering pre_get_posts
.
I would recommend checking the SQL that is run to try and debug.
$query = new WP_Query($args);
echo '<pre>'; var_dump($query->request); echo '</pre>';
Using that you can verify if the WHERE
clause includes the post_type for ‘page’ or ‘any’.
Related Posts:
- Issue attempting a wp_query_posts with tags
- Posts with at least 3 tags of a list of tags
- Better way to get tag stats?
- Given a WP_Query, how can I get a list of tags?
- Executing Queries in tag.php
- How to order posts tag by tag?
- post_type is ignored by WP_Query when ‘tag’ argument is included
- WP Rest API v2 return posts with specific tag
- Get All IDs Of A Post Type Using WP_Query
- Loop through all tags & output posts in alphabetical list
- Order posts by tags count?
- How to get any tag ID
- Get all posts without tags
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- Show all parents and children in custom post type in right order
- How to exclude products by tag from woocommerce shop page?
- wp_query for displaying attachments with a tag
- Pagination problem after WP_Query with tag filtering
- How can I pick a single post from the latest 3?
- How do I search inside specific taxonomies in WordPress
- Query post from all category with same tag on 1 pages
- reducing the amount of wp_query calls
- WordPress Related Post by tags in Single.php
- How to build a WP_Query using mulitple tags and using AND or OR operator between them
- Include tags in WP_Query
- Search for multiple tags?
- Display posts from only one post form in custom query and exclude in main query
- How can I make WP_Query get posts that have a tag but also have random other tags?
- Cluster WooCommerce products in each Category Archive by Tags assigned to products
- Display tags with random thumbnail from selection of posts with that tag
- Query posts intersecting tags and categories
- Combining categories (Query posts with multiple taxonomy terms)
- Order by most used tag
- WP Query with multiple tags by get the tags
- How to not display tags with less than X posts
- Query Posts by Tag and exclude
- Get posts that do not have the same tags as current
- exclude product with available tag
- How do you determine if a result in a search query is a post or a page?
- WP_Query by keyword OR post tag
- Display posts by tag
- Creating attachments archive in tags and categories
- Get posts with no tags?
- Custom wp_query differs on index page and category page
- Show multiple tax_query from 2 or more post_type in a single code
- Filter products on category AND tag
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- WordPress private post won’t display to other admins
- Only show tag with the same id as the post
- Get posts that match defined arrays of tags
- Order posts by tags count?
- Fix wp_term_relationships slow query in get_posts
- getting posts by tags
- Search with WP_Query, but ignore href URLs in anchor tags?
- Show posts from categories instead of tags
- Related Post by Tags Code
- Exclude all tagged posts from WP_Query loop
- I cannot get tax_query in get_posts() to work with custom taxonomy
- WordPress custom query by archive title
- How to create page that lists tags by initial letter?
- Random posts in WP_Query when searching by tag
- Limit Tags display and ad Drop Down Menu
- Can’t seem to get an else statement correct? [closed]
- Get posts that were most recently tagged
- Custom query for certain post type OR another post type with a certain category
- why ignore_sticky_posts in sticky post query
- WP_Query by post ID doesn’t work if post is in custom post_status
- WP_Query orderby taxonomy term value (numeric)
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Display link to taxonomy archive only if it has posts with certain custom field values
- Query total number of posts
- Category attribute not working in custom shortcode
- Show all post for a given category
- pagination with numbers for WP_User_Query
- Stuck in the query loop
- Filter wordpress post categories with jquery/ajax and pagination?
- How to display the featured image for each post?
- How do I amend wp_query before it is run/executed?
- Is there a way to make this kind of loop shorter and nicer?
- Merge 2 custom post type posts and taxonomy terms and sort ascending
- Pagination on template page for custom query redirecting to index.php
- how to get Nearby zipcode
- Exclude authors IDs from WP_Query
- Exec wp query in slow motion to avoid memory error?
- Wpdb->query result show 1 but is not an integer
- Remove post type filter added by the plugin in the final query
- How to get more data of a post by wp_query
- WP_User_Query orderby meta_val_num
- Query Taxonomy By Page Title
- Determine if ID is page or post and query the ID
- Search filter between promo and exact price
- Bootstrap grid while loop
- search multiple keywords with wp_query using one query
- Pre get posts sort by meta key returns no results if meta key does not exist
- How to define a custom hierarchy for terms?
- WP_User_Query not searching numbers?
- Retrieving category pages from subcategory returns empty sets
- Loop through multiple custom fields with increasing number
- Different number of posts showing in development vs production server
- WP Query – Show custom posts only if user contain some user meta