Customize search condition in search widget of geoDirectory

This topic contains 8 replies, has 4 voices, and was last updated by  Stiofan O’Connor 6 years, 3 months ago.

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #415567

    Jamie
    Expired Member
    Post count: 14

    I want to add a new condition in search widget of GeoDirectory. When I enter any location it displays listing of all category, my requirement is, it should display listing of only particular category.

    #415569

    Jamie
    Expired Member
    Post count: 14
    This reply has been marked as private.
    #415571

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #415574

    Jamie
    Expired Member
    Post count: 14

    It should display all listing of that category from where user searches.
    Example: If user searches from cat1 page, then it should display only listings of cat1. If user searches from cat2 page, then it should display only listings of cat2.

    Which type of security…??

    #415583

    Guust
    Moderator
    Post count: 29970

    That is not possible, but you can add a category selector to the GD Search widget, have a look here:
    https://wpgeodirectory.com/docs/gd-search/#cat

    Thanks

    #415588

    Jamie
    Expired Member
    Post count: 14

    Can you please tell, in which file database query is generated for retrieving listing..??

    If I get database query, then I will add one more condition.

    #415594

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Jamie,

    Guust’s answer above will do exactly what you want.

    ( We are currently working on GDv2, any snippet i give you to change this in the query will likely break on its release. )

    Thanks,

    Stiofan

    #415603

    Jamie
    Expired Member
    Post count: 14

    As Guust suggested, I have to choose category. I dont want to choose category, I want this automatically.
    I know it will be break on updating GD.
    Please tell me, in which file database query is generated for retrieving listing..??
    I’ll take care of it in next release. May be I will change my requirement later.

    #415637

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you implement what we are suggestion we can then give you a code snippet that will set the category in the dropdown to be the current one pretty easily.

    If not you probably want to look here:
    https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/listing_filters.php#L743

    Thanks,

    Stiofan

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

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

Open Support Ticket