Modifying the Search Query

This topic contains 4 replies, has 3 voices, and was last updated by  rob@theadplain.com 4 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #518769

    rob@theadplain.com
    Full Member
    Post count: 2

    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.

    #518783

    Alex Rollin
    Moderator
    Post count: 27815

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #518852

    rob@theadplain.com
    Full Member
    Post count: 2

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #519216

    Naveen Giri
    Moderator
    Post count: 1559

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #519219

    rob@theadplain.com
    Full Member
    Post count: 2

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket