Support » Plugin: Eventbrite API » Filtering events by organizer id

  • Resolved shango

    (@shango)


    Hi,

    I need a filtered lists of events for each page on a website. I’m filtering events by organizer ID using a function in the eventbrite-index template that sets the filter array’s organizer_id according using is_page(). Hope that makes sense.

    Seems filter correctly, however, I’m only getting some of the events of a particular organizer id.

    This page should have 3 events. It’s only displaying 2. If I set organizer id to null, in the template, I get the complete, unfiltered list.
    http://wtci-nyc.org/6-week-groups/

    Also, the iframe heights are killing me. I’d love to set scrolling=”no”, I’d love to set the height to automatically adjust to the ticket form size. Any tips?

    Here’s my crazy filtering function. Suggestions?

    	function pageToOrgId() {
    	   if( is_page( 20 ) ) {
    	    return 11918347493;
    	   } else if( is_page( 14 ) ) {
    	    return 11918331381;
    	   } else if( is_page( 526 ) ) {
    	    return 11918355549;
    	   } else {
    	    return 'null';
    	  }
           }
    	
    $org_id = pageToOrgId();
    
    // Set up and call our Eventbrite query.
    $events = new Eventbrite_Query( apply_filters( 'eventbrite_query_args', array(
    	'organizer_id' => $orgID,     // integer
Viewing 1 replies (of 1 total)
  • Plugin Author Automattic

    (@automattic)

    Hi,

    Looks like a variable mismatch; you assign to $org_id, but then call $orgID.

    Also, the iframe heights are killing me. I’d love to set scrolling=”no”, I’d love to set the height to automatically adjust to the ticket form size. Any tips?

    Yeah, this is a tough one. Because it’s an iframe, the plugin can’t really tell what’s going on, so we have to make some educated guesses as to what an appropriate height would be based on the info we have for the event. It is filterable though, so you can adjust the final result however you like. Also note that the heights are looking particularly off right now since Eventbrite did a recent redesign of that widget (hoping to have that fixed up in the next week or two).

Viewing 1 replies (of 1 total)
  • The topic ‘Filtering events by organizer id’ is closed to new replies.