Use WP_query to match post types based on custom field values
i’m trying to query posts from the post type Product that match with the current post in the loop from the post type Item, based on the custom fields product-ean and item-ean.
For example: i have a Item post with item-ean 123 and 2 Product posts with product-ean 123. Now i would like to show both Product posts on the Item post.
Help is greatly appreciated, thank you.