I’m using the [ESPRESSO_TICKET_SELECTOR event_id=1482] shortcode inside an event.
Is there a way to use this shortcode, or equivalent, and have it automatically get the ID of the event it’s in?
i.e. To use the shortcode inside an event without the need to input the ID.
Currently, that shortcode requires the event_id be passed to it. You could add the ticket selector using a hook and then pass the post ID to the function but it depends if you are comfortable with PHP.
However, I’m curious on the use case for this as the event should already display the ticket selector, so may I ask why you are using the ESPRESSO_TICKET_SELECTOR shortcode within an event itself?
Another approach you could take would be to move the ticket table to a specific location by means a new shortcode. The new shortcode basically adds a little html placeholder for the location and adds a script that moves the ticket table to the location. Here’s the code:
The support post ‘Can Espresso Ticket Selector shortcode recognise the current event?’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.