Support

Home Forums Wait List Manager Add-on Template Tag

Template Tag

Posted: March 12, 2019 at 8:14 pm


Michael

March 12, 2019 at 8:14 pm

Hi, my goal is to have the wait list manager show up on the archives page per event that is sold out. This is a two part question:

1- Is there a template tag to show the wait list plugin in my archives page like I currently do the Multiple Event add on?

<?php global $post;
espresso_ticket_selector( $post );
?>

2- I found (after a lot of digging) method for events, so I can check out the status of a event. Is there docs that have a complete list of even methods, such as:

<?php
$event = EEH_Event_View::get_event();
if ( $event instanceof EE_Event ) {
	if ( $event->is_sold_out() || $event->is_sold_out( TRUE ) ) {
		echo '<h2>Sold out!</h2>';
	}
}
?>

Ex:
is_sold_out
Etc.

Thank you!!


Tony

  • Support Staff

March 13, 2019 at 3:54 am

1- Is there a template tag to show the wait list plugin in my archives page like I currently do the Multiple Event add on?

Just to note, there is nothing specific to the Multi-Event Registration add-on (MER) there, that template tag calls the ticket selector, MER hooks into the ticket selector to add its functionality but the above is not specific to MER.

The Waitlist add-on already hooks into the ticket selector so it should show automatically with the above anyway, have you set the event up to have waitlist spaces available and then forced the event sold out to view if it works?

2- I found (after a lot of digging) method for events, so I can check out the status of a event. Is there docs that have a complete list of even methods, such as:

We don’t currently have documentation listing all of the available methods on every object.

However, you can use the Kint Debugger plugin, wrap the object in d(); and it will output all of the available methods in a readable format for you.

Just to note, please don’t use $event->is_sold_out( TRUE ) as it performs all of the calculations on every request which normally isn’t needed and will slow down the request, just use $event->is_sold_out() to check the status of the event.


Michael

March 13, 2019 at 7:56 pm

Thanks for the reply. My apologies, I jumped the gun on how the add-on works. Its currently working as intended. I have two new issues regarding the modal, I will start a new thread. Thanks for the help!

The support post ‘Template Tag’ 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