Forums Forums Search & Filter Pro Search multiple fields with single query parameter

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #61341

    Is it possible to search multiple fields with single query parameter?

    i.e. schedule list that data has start date and end date.
    so when search a date, I want search both start & end date.

    Trevor
    #61544

    There isn’t a simple Yes/No answer to your question.

    You have some posts (post or custom posts) that have fields of data, two of which are some form of date field (one a start and the other a finish). Are you wanting to find which posts have such fields where a given date falls between or on those start and finish dates?

    Anonymous
    #63834

    Sorry for my late reply.

    I will make something like month taxonomy like Tags.
    So I can search items in specific month even if there are items that continues from previous month.

    Trevor
    #63954

    Well, I would make a custom field (this sort of data probably isn’t really a taxonomy) where the data is a select list like this:

    Value : Label

    201610 : October 2016
    201611 : November 2016

    Where you can show the Labels to the search form, but actually sort by the values (otherwise in the dropdown list you would get all the Octobers together, and the months would not be in the right order). The list will get long.

    Anonymous
    #64113

    That would be OK but some event continues to next month.
    like 2016-10-31 ~ 2016-11-01
    So it need to be hold multiple value like Categories or Tags

    Trevor
    #64179

    ACF allows you to make a Select type field with the option to allow Select Multiple values. Or, at least, my copy of the plugin does.

    Anonymous
    #64227

    I see, I will make custom field like “_event_month”.
    Since this field will be created from event start/end date field programmatically when save post, I don’t need it to be visible or editable on Admin screen.
    So write custom function for this would be more simple.

    Trevor
    #64378

    Do you need anything more from me?

    Be aware that ACF makes 3 meta keys for each field, and the one to choose in the S&F Pro form field UI is WITHOUT the preceding underscore, e.g. event_month and NOT _event_month

    Anonymous
    #64567

    I will not use ACF to make this field.
    So is it OK to search field with underscore?

    Trevor
    #64569

    AFAIK it is OK. That issue exists only with ACF, I think.

Viewing 10 posts - 1 through 10 (of 12 total)