WordPress.org

Support

Support » Plugins and Hacks » Events Manager » [Plugin: Events Manager] Find out if on single event page

[Plugin: Events Manager] Find out if on single event page

  • Hi there,

    so I need to find out where I am when I am on a single event page. How are these pages generated?

    The reason for this is breadcrumbs. So on the events homepage I need the breadcrumbs to read

    Home >> Events (is not a hyperlink)

    And then on an event’s page (single event page) I need the breadcrumbs to read:

    Home >> Events (is a hyperlink) >> Event Name

    I’ve achieved the above via Javascript. The problem is now, I need to do something like

    <?php if(child_of(get_page_ID('events')): ?>

    But I don’t think the event single pages are actually children of the events page are they?

    http://wordpress.org/extend/plugins/events-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hmm I guess I can use the event-single.php template and build the whole page from scratch there. I don’t really want to do this though.

    edit: for the time being, I’ve done this with javascript, showing two divs containing different sets of breadcrumbs and hiding/showing them depending on a single ID that is only present on the single event page. It’s lame I know, but it’s working.

    Plugin Author Marcus

    @netweblogic

    there are some functions like is_event_page in em-template-tags.php

    also, if you check em-events.php you’ll see in the first function how this is calculated.

    Oh right! Thanks Marcus I will check it out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Events Manager] Find out if on single event page’ is closed to new replies.
Skip to toolbar