Detecting page type when viewing events

Home Forums Calendar Products Events Calendar PRO Detecting page type when viewing events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16029
    Mike
    Participant

    I need to be able to show a custom sidebar when the events calendar grid/list view is shown and when a single event or venue is being shown.

    At the moment I test for various conditions (whether a page or post is being shown, what the template type is, page ID and root page ID) but this doesn’t work for events as the template is always “page” and the page id is always different.

    I can’t rely on tribe_get_current_template() either as this always returns a value regardless of whether the events calendar is being viewed or not.

    I need to be able to test something along the lines of “is the event calendar grid/list/info/venue being viewed” but don’t know what the code would be to do this.

    Sorry if this is jumbly and unclear.

    #16030
    Mike
    Participant

    Ignore me!

    Just added a new sidebar called only from the page template assigned to the events calendar in the back end. Was just a bit confused as the template name wasn’t showing up in my debug info.

    #16055
    Rob
    Member

    Excellent to hear you got this figured out, MIke! If you have any other issues here or need us to take further action on our end, please do let me know. Happy to help where possible.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Detecting page type when viewing events’ is closed to new replies.