Support

Home Forums Event Espresso Premium Show "Tickets On Sale" label only for events with tickets

Show "Tickets On Sale" label only for events with tickets

Posted: November 11, 2021 at 11:15 pm

Viewing 3 reply threads


joyandraenton

November 11, 2021 at 11:15 pm

Hi Support. How would I configure events that only have tickets for sale to display an element with a “Tickets on Sale” text label?


Tony

  • Support Staff

November 12, 2021 at 9:25 am

Hi there,

I’m sorry but I’m not sure I understand the question, can you explain a little more?

Or maybe include a screenshot which shows what you are trying to do?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots


joyandraenton

November 13, 2021 at 10:03 pm

This reply has been marked as private.


Tony

  • Support Staff

November 15, 2021 at 4:57 am

OK, so is that a custom template you are using?

If you are asking how you can do within your own template there is a method on the EE_Event object called tickets_on_sale() you can use to check for tickets that are currently on sale with something like:

if ($event->tickets_on_sale()) {
    // Output label/badge within here.
}

Depending on where you want to include it you could also use a hook, such as:

do_action( 'AHEE_event_details_before_the_content', $post );

Grab the EE_Event object from that post and use the above again.

Viewing 3 reply threads

The support post ‘Show "Tickets On Sale" label only for events with tickets’ 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