I can only assume that there is filter running on the category page that is overwriting your post type.
- Try adding
'suppress_filters'=>true
to your query arguments, but that only works for some filters not all. I suspect it will not work in this case. - Or find the filter that is altering the query and modify it so that
it does not overwrite existingpost_type
arguments, which is what
I assume the filter does.
I expect that option #2 is going to be the solution.
Related Posts:
- Get All IDs Of A Post Type Using WP_Query
- Show all parents and children in custom post type in right order
- wp_query for displaying attachments with a tag
- How can I pick a single post from the latest 3?
- How do I search inside specific taxonomies in WordPress
- How do you determine if a result in a search query is a post or a page?
- Show multiple tax_query from 2 or more post_type in a single code
- 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
- post_type not working when tag__in is present?
- Issue attempting a wp_query_posts with tags
- Custom query for certain post type OR another post type with a certain category
- Page template query with WP_Query
- get_queried_object() returns null on post date archive
- How to clear the cache?
- What to do in this case after wp_query has been modified
- Exclude comments from a WP_Query object?
- Get the number of posts from the current page results
- How to get random posts and order them by date
- Get WooCommerce best selling products for the current month [closed]
- When should you use wp_reset_postdata vs wp_reset_query?
- Custom search form with empty parameters
- Post queries by latitude and longitude
- How to use global post counter in the loop?
- Front End Sorting Questions
- Meta_query with or without value
- How can I query posts from multiple roles?
- WP_Query Filtred by author name ( Return null )
- How to add terms to my tax_query based off of the current post
- How To Get Some Data From WordPress Database Using WordPress $wpdb Query?
- Using $paged redirects /page/2 to page 1
- Why wont this wp_query exclude certain pages?
- How do I change database charset when using `wpdb`
- WP_Query attachments by multiple IDs
- get_posts – get all posts by array of author
- wp_query not searching with apostrophe
- Query “Category A” + 1 post from “Category B” – how?
- How to combine two or more WP_Query?
- Assigning a meta_query value based on regexp to wp_query fails
- Getting Taxonomy inside WP_Query Loop
- WP_Query custom query showing only 10 posts on all pages
- Not getting metavalue
- Ajax load more posts – WP_Query parameters not working
- How to display multiple custom fields with the same meta_key in an ascending order?
- Using the_post_thumbnail resets current loop item ID
- Posts not showing per category after WP_Query?
- wp_query exclude word and category
- Assign Json file to WP_Query
- How can I query users by custom role?
- WP Query to have sticky posts first, with pagination and having a joint ‘posts per page’ arg with main loop
- How to increase load time of an archive/search page (WP_Query)
- Problem with is_tax in WP_Query loop
- Removing duplicate values between two wordpress queries
- Issue with front page navigation after upgrading to 3.4
- Ordering posts by an array
- Prevent author bio page from showing in search results
- Exclude recently updated post from custom WP_Query using multiple loops
- get_posts output always same post
- WordPress Custom Search Form Displaying Unexpected Results
- WP_Query array key / value pairs?
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Limit number of posts in loop
- How do I get Woocommerce product variation name and variation description in a WP_Query?
- WP_Query offset is returning post from prevois loop
- Does WP_Query ‘responds’ badly to empty arguments?
- Does putting queries within loops cause an issue on WordPress?
- How to create Page templates for showing Blog posts in different layouts?
- Trouble Making WP_Query paged
- Sort posts using multiple custom fields and menu_order in single query?
- Generate custom output on URL with directory
- prevent get_comments() from returning comments not in comment__in
- WP Query should show No Posts when tax_query $args taxonomies don’t have associated posts
- How to make WPQuery custom post type work in Twig / Timber
- Display posts from multiple value in meta separated by comma
- WooCommerce. How To Exclude Subcategory Products From Category Listing Page
- IF ( ! $loop->have_posts() ) condition doesn’t work – WP_Query
- get_posts return only first result
- WordPress – Form does not filter the results of taxonomies
- Getting posts by custom field value
- Show one post of each custom taxonomy
- wordpress multiple meta value query is not working
- trying to change from query_post to WP_Query
- Strange results from WP_Query
- WordPress For Loop Prints Unwanted Extra Paragraph Element
- return child post if available otherwise parent post
- Order Posts By Custom Field That is an array of objects
- WP_Query doesn’t work when url parameter is added
- why ignore_sticky_posts in sticky post query
- Woocommerce orderby rand with tax_query not random
- Select Unique Posts for a List of Tags
- Use not custom fields in get_posts() meta_query?
- WP_Query always returning the last custom post
- why is this query returning entire blog-posts
- Pagination error WordPress multiple loop
- Multiple wp_query loops showing first 5 posts on all pages instead of older posts[Resolved]
- Pagination With Custom WP Query not functioning
- SQL returned by Wp_Query has wp_posts.ID = -1
- Filter posts by category
- Incorrect taxonomy ID assigned to post with custom query
- Custom Taxonomy in custom REST API search