Events Manager
[resolved] Determine if single or list event in template? (3 posts)

  1. gojsse
    Posted 4 years ago #

    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.

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

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

  3. gojsse
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic