Support

Home Forums Event Espresso Premium How to Remove Register Button on Inactive Event Pages?

How to Remove Register Button on Inactive Event Pages?

Posted: August 28, 2013 at 2:05 pm


eastendmkt

August 28, 2013 at 2:05 pm

How do you remove the register or view cart button from events that aren’t open for registration yet?

WP version: 3.5.2
EE Version 3.1.34.P
EE Add-ons: Multi event reg Version 1.0.4
Ticketing Version 2.0.10.1
Requirements check Version 0.9

Inactive Event Page that shows register button: http://eastendmkt.com/events/taste-and-toast-to-east-end-market/


Josh

  • Support Staff

August 28, 2013 at 8:30 pm

Hi there,

It looks like the link is to register is hardcoded in. In order to make the button inactive the code that generates the button could be wrapped in a conditional that checks to see if the event is active before displaying the button.

While I can’t be certain that the template that this page has the variables that make this happen, this is some example code that will work on event_list_display.php that could be adapted to be used on the template used here:

<?php
switch ($status['status']) {

	case 'REGISTRATION_NOT_OPEN': //don't show the button
	
	// custom message that says that registration isn't open yet can go here

	break; // end registration not open

	default: // This will display the registration button
	
	// button code goes here
				
	break; // end default

} // end switch

?>

You may need to copy over the variables from the event_list.php template that set the event status variables to make this happen if they are not already present in your custom template.

The support post ‘How to Remove Register Button on Inactive Event Pages?’ 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