• Resolved Tony Law

    (@lbtdev)


    Is it possible to restrict the search criteria to certain fields i.e Name and Location only?

    Example. I have hundreds of events setup where the location of the event itself may be in London but the main contact may be in Barcelona. So this London event will show up if someone search for events in Barcelona.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author PressTigers

    (@presstigers)

    @lbtdev,

    You can customize the search query according to your requirements. For this, you have to understand the SEP coding structure and then customize the search module as per your needs.

    Thanks & Regards,

    Thread Starter Tony Law

    (@lbtdev)

    Thanks for the reply.

    I am a web developer, so do understand code. However, I can’t seem to find the functions that carry out the search. Can you please point me in the right direction to amend the code please.

    Thanks

    Plugin Author PressTigers

    (@presstigers)

    @lbtdev,

    Currently, the event search is working for the event title only. If you want to customize it then you can use the post_search filter that we have used for the event search in the simple-event-planner-template-functions.php file at line# 878.

    Thanks & Regards,

    Thread Starter Tony Law

    (@lbtdev)

    Thanks.

    Thats interesting. The filter doesn’t seem to be working as it’s definitely searching on more than just the event title. I’m getting results where the search criteria appears in the body as well.

    Plugin Author PressTigers

    (@presstigers)

    @lbtdev,

    It seems some of your installed plugins or theme’s script overriding the search query.

    Please deactivate the plugins one by one except Simple Event Planner and activate any WP default Twenty Theme and then check again.

    Thanks & Regards,

    Thread Starter Tony Law

    (@lbtdev)

    Ah! I had a plugin which was modifying the search! Disabled and now I can see it’s using title only.

    Plugin Author PressTigers

    (@presstigers)

    Glad to know that things are working fine at your end.

    Have a great day!

    Best Regards,

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Restrict search to certain fields?’ is closed to new replies.