Get Event ID on Single Event Page

Home Forums Calendar Products Events Calendar PRO Get Event ID on Single Event Page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1130017
    Laura Yeffeth
    Participant

    How do I retrieve the event ID for a single event outside the loop.

    #1130094
    Cliff
    Member

    Hi. Where are you wanting to display it and how are you wanting to display it?

    For example, are you wanting to get an event’s ID from its URL or from its post title or something else?

    #1130114
    Laura Yeffeth
    Participant

    From the URL would be fine. I need to add something to the header for a specific event, so I’m looking for a conditional statement I can use to target the event.

    #1130358
    Cliff
    Member

    However you choose to get it, the Event ID is just the WordPress Post ID.

    url_to_postid() or a similar function might be helpful to you.

    Once you get a Post ID, though, you should run it through tribe_is_event() to verify the Post ID is an Event ID.

    I hope that helps.

    #1136548
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Get Event ID on Single Event Page’ is closed to new replies.