• Resolved Argentum

    (@argentum)


    How can I control which sidebar widgets are shown using Widget logic when viewing a single event? The event categories are separate from the WP ones, right? Is there some global call call for events, like the one I use for pages

    
    in_category( 'Courses' )
    

    ?

Viewing 1 replies (of 1 total)
  • Plugin Author Franky

    (@liedekef)

    Basically:

    if (eme_is_single_event_page()) {
       $event_id = intval(get_query_var('event_id'));
       $event=eme_get_event($event_id);
       $category_ids=$event['event_category_ids'];
    }

    Or, using $event_id, get a list of category names using eme_get_event_category_names($event_id)

    After that, use print_r to look through the result …

Viewing 1 replies (of 1 total)

The topic ‘Widget logic for single Event’ is closed to new replies.