I have several custom posts that have a meta field that's just an integer, and that integer refers to another custom post and I need to get data from that integer.
For example, I have a custom post type called
foods and it has a custom meta key of
food_chart and a meta value of
20 is the post ID of a custom post type called
I want to be able to list and search/filter all the foods (can be easily done with meta queries), but I also want to add a search feature that lets the user filter by a value inside the
food_charts set of meta values, like the
food_charts author or time it was created. How would I filter search results from data in the
food_charts post type while listing all the original
It's worth mentioning that I'm using Advanced Custom Fields Pro and the "recommended" ACF Search Plugin doesn't actually work for me, and I'm using WordPress 4.8.