Hi, in short, how can I modify the search query to show places only if they have a linked CPT post and it matches the id?
The site has two CPTs; products (gd_products) that are linked to stockists (gd_stockists). The user searches for the product, then clicks a button that creates a new URL search query with the product_id (and location, post type, looks something like this:
/?geodir_search=1&stype=gd_place&linked_id=364&snear=90210&sgeo_lat=34.0857566462935.
I’m trying to show stockists that have linked to that product (and are near the location).
I’ve tried various functions of pre_get_posts, posts_join & posts_where but it’s not working and after digging through the geo_directory main plugin I see that the filters are all removed.