Just change the post_type
bit to:
'post_type' => array('testimonial', 'other_post_type', 'another-post-type'),
Assuming that taxonomy is valid across all 3 post types. Otherwise you’ll have to leave that out.
Why? You can pass an array to post_type
field.
Related Posts:
- How to get to a specific position in wp_query?
- How to add div blocks after certain set of post
- How to overwrite orderby with add_query_var
- Inject post (from specific category) between posts in Loop
- Build a content and excerpt grid loop with paging and options for # of posts
- How to create a WP_Query to search the Title or Tag?
- Alter secondary loop to exclude posts from current page category
- Specific Loop For 2 Within Each
- Display related products with custom output
- spliting posts into two columns
- have_posts() execution failure
- Why is variable not working on custom sql query using wpdb?
- Using foreach loop breaks
- Create WP_Query to search for posts by their categories or their parent/child categories
- WP Query with custom Shortcode
- Increase offset while looping
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- WP_Query fails despite having 1 post
- unable to use ‘new WP_Query’ in AJAX call
- wp_query get the 2nd post
- How to get post ID in a Page?
- Display an image if odd number of posts in grid
- get_the_ID() in the footer returns wrong value
- WordPress query undefined offset in loop
- Issue with custom loop in Archive page
- How to display SQL query that ran in WC_Order_Query?
- Get all posts as an array ID => Name
- How to hide posts of a specific custom category in WordPress?
- WP_Query multiple post results
- Do not duplicate posts with multiple categories in multiple loops
- Infinite Loop – WP_Query
- Dividing the loop to style post differently
- Limit tags shown in post
- How to extract information from a wp_query result?
- Echo array value
- Search.php gets metadata from first post
- the_post(); prints out style text into my HTML?
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- Wp Query : Order by distance lat,lon
- How can I modify this code to make the search box include tags and meta
- Display articles with a different template in the home page | Solved |
- in_array not working on dev server but works on localhost
- How to display sticky post always at the top (before regular post) in wordpress?
- wordpress query returning unexpected results
- Making list of posts with chosen description
- Query doesn’t display text data with apostrophes
- My query keeps looping infinitely ! how to stop it?
- Efficient way of querying for a “fallback” post?
- How can I display a query in a page?
- For each 3 posts, show a different post type
- Add post class in custom loop (WP_QUERY)
- Create a hierarchical loop at predefined markup requirements
- Problems With Query and/or Template Part and/or PHP
- Advanced Taxonomy query, with 3 post types
- Why does a meta_query break this WP_Query?
- Does wp_query and query_posts affect website performance? [duplicate]
- WordPress post pagination on custom template not working
- Pagination in category.php not functioning
- wp_query on search results page showing all results every time
- Show post like this image in my newssite [closed]
- Three different queries on same page
- How to use a conditional statement in a post loop but not count towards the “posts_per_page” if false
- How do I exclude the current post from the upcoming post query
- How do I display WooCommerce products in my query to rows of 3?
- How to get posts by a certain author in inner loop using outer loop variable or post title WordPress
- Should we trust the post globals?
- WP_Query: query posts by ids from array?
- pre_get_posts with get_posts
- How to order WP_User_Query results to match the order of an array of user IDs?
- Query Custom Meta Value with Increment
- WP_Query | Help me create a search term with an ‘OR’ relation?
- How to change post count in wordpress loop?
- WordPress loop specific thumbnail size
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- Cannot display or echo alt text on featured image
- Using Advanced Custom Fields to create a per page slider
- WordPress Search Results for Multiple Post Types
- Using loop pagination on single.php
- Display category name only once inside loop
- PHP -> SQL Query with Summing
- How to insert wp_users ->user login name to wp_terms when a new user registering?
- Sort posts in a specific way
- foreach loop inside the loop creating duplicates in output
- posts_nav_link pulling in multiple post types
- How to break up php code to avoid echo
- SQL error with custom query
- Sending simple variable on single page to WP JSON
- My Custom Post Type AJAX Query is Returning no posts – why?
- How to exclude meta no index pages from wp_list_pages
- Products listing check if meta checkbox is checked
- Multiple Arrays for Custom Post Query using Boostrap accordions and ACF repeater fields
- View tag description on page
- Insert div after every three posts in home.php [duplicate]
- SQL Query Search page
- insert thumbnail image from php script
- Masonry layout within the loop
- How to have post count after each listed category
- How can I put a custom field as the link of a button shortcode?
- is there away to hide php code in wordpress not to show in PAGES
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise