Support » Plugin: Eventbrite API » Filtering events by search parameter

  • Resolved Andy14

    (@andy14)


    Hi,

    I’m trying to filter a set of events (created with Eventbrite_Query) by the WordPress search parameter. Given Eventbrite_Query extends WP_Query I thought I could just add that search parameter to the array:

    $args = array(
      'display_private' => true,
      's' => $s
    );
    $search_results = new Eventbrite_Query($args);

    … but that just returns all the events. Is there another approach I should be trying here?

    Cheers,
    Andy

    • This topic was modified 8 months, 2 weeks ago by Andy14.
    • This topic was modified 8 months, 2 weeks ago by Andy14.
Viewing 1 replies (of 1 total)
  • Plugin Author Automattic

    (@automattic)

    Hi Andy,

    No, I’m afraid that’s not implemented (I believe it was more complicated do to the fact that we’re sourcing an API result, rather than the WP db). You can see the supported arguments in the plugin’s README (under Classes > Eventbrite_Query).

    I think your best approach is to get the results of your Eventbrite_Query, then filter using array_filter or something similar before outputting the events.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.