• Resolved iamnickbarth

    (@iamnickbarth)


    I’m trying to include a list of related events (by category) to the single event listing page. I’m grabbing events with:

    EM_Events::output(array(‘limit’ => 3, orderby => ‘event_start_date’, category => $category)

    where $category is set via the clunky:

    $event = em_get_event(get_the_ID(), ‘post_id’); $category = $event->output(“#_CATEGORYNAME”);

    First, how can I exclude the event I’m looking at? I can’t find a way to exclude the event via id from the EM_Events::output call.

    Second, is there a better way to get the event’s category list in text than that em_get_event call?

    Thanks,
    Nick

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    hi,

    1. you can add negative sign to the category id which means exclude the event that has this category assigned eg. -X where X is the category id

    2. you can see sample snippet under events-manager/templates/placeholders/categories.php

    Thread Starter iamnickbarth

    (@iamnickbarth)

    Thanks, Angelo.

    I know how to exclude categories; what I would like is to exclude by id instead or otherwise exclude the ‘active’ event being displayed by single-event.php.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude events by id from EM_Events::output array’ is closed to new replies.