Get the two post types along with their acf meta and use PHP Array Functions ( like Array Interset) to get the common/union or intersection. Additionally this will help you in this regards.
Related Posts:
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- Having trouble with custom date field for CPT query (WordPress)
- Conditional to modify query results
- First custom field value (out of several) displayed twice after query
- WP Query from two Custom Post type fields as statement
- WP_Query: include custom post type only with specific meta value
- WP_Query orderby modified to include custom meta changes
- WordPress custom loop filter by meta_key and value with serialize data
- Returning a list of custom post types excluding those without a specific meta_value
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- wp_query check if integer exists in custom field’s array
- convert custom query to wp_query
- Search / Filter posts on Title/Content OR Tags
- Querying Two Custom Post Types with OR Not Working
- How can I get the number of custom post type posts that have a specific attachment image set?
- Problem querying Custom post type by custom fields
- Orderby CPT custom fields not working
- WP_Query order by custom field, then randomly order some of results
- creat filter with wp_query
- Query custom post type with ACF Date
- Including metaboxes from custom post types in global search — continued
- Query Multiple Custom Posts by Custom Fields
- Get Posts by multiple custom fields is not working
- Order Custom Post Type by Custom Field Value
- Prioritize posts in query by meta keys?
- WP_Query orderby and tax_query
- Different Ways to Query Custom Post Types?
- Possible to filter custom post type with multiple meta data?
- Query based on custom fields start and end date
- Showing specific post in order of array wp_query
- DIsplaying URL of custom field in last post of certain taxonomy && post type
- WP Query ‘posts_per_page’
- Display post from a date range from custom field
- WP_Query() with custom post type and taxonomy — get all terms?
- post_per_page ignored in WP_Query
- How to get specific post meta by title or id
- Getting a custom post’s custom field based on another custom post’s custom field select
- How to conditionally add Custom Post Type to Front Page
- WP_Query orderby not work with meta_key
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Returning a custom content types with meta values
- Custom Query: If One Post Object Field Value Is The Same As Another
- Display custom post type for specific user
- Custom Post type loop with ACF not displaying properly
- Group by custom field value (start and end times)
- Create query for both custom post type and category
- Filtering custom posts by custom fields (ACF) [closed]
- Cache issue with WP_Query and custom field filtering
- Query custom posts from custom taxonomy
- How do I list a custom field and custom taxonomies for each result in a loop?
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- WP query_posts group by meta field related
- Custom Form / Search with Custom Post Type Data
- Change search query in wordpress custom post type
- Create if else for post types in WP_Query ‘post__in’ values
- Alike Shortcode using in Custom Shortcode
- WP Query: If field X is empty, show posts based on field Y
- Query custom post type that has a serialized relational advanced custom field value
- Using OR relation in meta_query to check for a value before sorting by another
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- WP_Query get always custom post_type for first
- Sort custom post column by generated value?
- How can I query and sort custom-post type using WP_Query
- Meta query and compare “!=” not working as expected
- How select query is generated in a Custom Post Type?
- Filter posts by their related field’s custom field
- How can I fetch all the dates from custom fields from various different custom post types and show / list them at one place in ascending order?
- Query custom post type and custom field by URL parameters
- WP_Query for custom taxonomies showing posts from non-specified terms?
- How do I query with multiple custom fields orderby in same column?
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- meta query multiple values for the same key
- Sort custom post archives by a meta value from a different custom post type?
- WP_Query with all posts in one custom post type and only posts in another custom post type with a specific category
- Custom post types – meta_query: search lesson which starts sooner
- Post Filtered by Custom Field Value
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- post type => ‘any’ not applied my custom queries
- sorting in wp query based on custom field value
- Meta_Query refuses to return results
- Linking posts together with Advanced Custom Fields “both ways”
- How do I display specific custom posts, and how do I edit a post’s singular page?
- WordPress query in which condition uses custom field
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Error in WP Query. If variable is empty it is displaying previous post value
- Query events post type after current date and timezone
- Get posts of an specific term of a custom taxonomy
- Show first posts with custom field not empty and order all by title
- Conditional posts in WP_query for search
- Query Pulling the same post twice
- Is it possible to add query parameters on the archive page?
- Calling specific page with wp query
- How to stop wp_query searching pages as well as the specified CPT
- Selecting posts older than the current Unix epoch timestamp
- WP_Query and two custom fields returns no posts
- WP_Query get posts where post_name is empty