Search parameter in tribe_get_events

Home Forums Calendar Products Events Calendar PRO Search parameter in tribe_get_events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1322023
    Emmanuel
    Participant

    Hi,

    We are currently building a filter box for our calendar, and we are encountering an issue.

    We are using tribe_get_events to fetch events between two dates, and we need to add a search string in our search.

    But when we add a ‘s’ parameter, the query return an empty result.

    $query = array(
    ‘eventDisplay’ => ‘custom’,
    ‘start_date’ => $year_start.’-01-01 00:01′,
    ‘end_date’ => $year_start.’-12-31 23:59′,
    ‘s’ => $search,
    );
    tribe_get_events($query);

    The query without the ‘s’ parameter is working as expected.
    We tried a standard WP_Query, with only ‘s’ and ‘post_type’ as parameters, and it was working fine.

    What have we done wronge ?

    Regards,

    Cam

    #1322833
    Jennifer
    Keymaster

    Hi Cam,

    Thanks for reaching out! I’m sorry you’re not able to get the search parameter to work with tribe_get_events, as it should indeed work.

    I do want to note that WP search only looks at the post title, excerpt, and content, not at any of the custom fields. Could it be that you are using terms that are only found in custom fields, and do not appear in any of the applicable events’ default fields (title, excerpt, post)?

    I would recommend doing a quick search with a term that you know is in a default field of at least one event and see if you are able to get any results.

    Let me know how it goes!

    Thanks,

    Jennifer

    #1332877
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Search parameter in tribe_get_events’ is closed to new replies.