Support

Home Forums Event Espresso Premium How to link ticket to event (from event list)

How to link ticket to event (from event list)

Posted: March 16, 2020 at 6:54 am

Viewing 4 reply threads


Shakeera Khan

March 16, 2020 at 6:54 am

I’ve set up a page which uses an EE shortcode – [ESPRESSO_EVENTS category_slug=show]

The way I’ve set it up is only the most upcoming ticket within an event is showing. I’m not quite sure how to link the ticket though. If yo mouseover the title (the ticket name) it only links to the current page. I’ve tried referencing EVT_ID and EVT_slug, but neither work. How can I link the ticket title to the event?

I’m editing template_tags.php


Tony

  • Support Staff

March 16, 2020 at 7:43 am

Hi there,

May I ask what you mean by ‘link to the ticket’?
Do you want to display the ticket selector on the event list?

I’m editing template_tags.php

Are you editing that file directly within event espresso? If so please don’t, we can’t provide support if you edit core files directly and those functions are pluggable so there is no need to edit them directly.


Shakeera Khan

March 16, 2020 at 7:48 am

This reply has been marked as private.


Tony

  • Support Staff

March 16, 2020 at 8:13 am

EE events are a custom post type, so if you have the event ID then you can use:

get_permalink($EVT_ID);

Assuming the event id is stored within $EVT_ID in your template.

If you have an EE_Event object:

$event->get_permalink();

Will do it for you, it’s just a wrapper for get_permalink($this->ID()); within the class.

To be honest, I’m not sure where template_tags.php comes into play here.

Are you not editing the event list template itself? (again from your theme)


Shakeera Khan

March 16, 2020 at 7:12 pm

Thank you! Exactly what I needed.

Viewing 4 reply threads

The support post ‘How to link ticket to event (from event list)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso