I think I am having just a mind blank, but I can’t seem to remember / work out how to pass some data and use it as part of a filter.
Setup:
I use beaver builder to manage my page layouts
ACF for custom fields
Use case:
I have two post types (dataset1 and dataset2)
In each dataset I have custom field that contains a reference number
I want to be able to display related data from dataset2 on the post for dataset1.
for example lets say my current post has a custom field called reference with the content of “1234”
I want to pass that reference of “1234” and use it to query the dataset2 field called reference (please note that the custom fields in each are ACF but not related - just text fields)
The overall expectation is it will display all posts in dataset2 that have the reference field of dataset1 current post.
Thanks