Support » Plugin: Events Manager » Determine if single or list event in template?

  • Resolved gojsse


    So I have copied the template files from events manager to my theme/plugins folder in order to have better control over what is displayed on my events page.

    Because of the way events are handled with this plugin, the yoast seo breadcrumb function doesn’t work with the events page. It just shows Home >> Events even if on a single event. Makes sense.

    So I’m making a custom function to use the yoast bread crumbs if not on the Events page. If it is on the page then I’m going to render the breadcrumbs manually. I need to know if there is something related to $EM_Event (object?) that can tell my wp template if I’m viewing the events list or single even.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcus


    NetWebLogic Support

    check the em-template-tags.php file, there’s some new functions there i need to document

    Alright! thanks.

    I used

    global $EM_Event;
    if ( em_is_event_page() ) {
        //do stuff to append single event nav
    } elseif ( em_is_events_page() ) {
        //do stuff to append events list nav
    } else {
        //must not be an event(s) page so do yoast breadcrumb function
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Determine if single or list event in template?’ is closed to new replies.