Support

Home Forums Event Espresso Premium Hide Messages in Event Registration Pages

Hide Messages in Event Registration Pages

Posted: November 24, 2013 at 10:03 am


Kindra Goehler

November 24, 2013 at 10:03 am

Hello,

I’d like to turn off messages & alerts about events if registration isn’t required. What I think needs to happen is this snippet

if ($display_reg_form == 'Y') {

needs to go somewhere near

<code>}//End display description

	switch ($is_active[&#039;status&#039;]) {
	
		case &#039;EXPIRED&#039;: </code>

in registration_page_display – but I can’t figure out how to integrate it.

Any help is appreciated!

Thank you,
Kindra


Dean

November 25, 2013 at 2:38 am

Hi Kindra,

Are you trying to have an event that does not show the expired message? If so rather than changing the templates, you could set the event status to Ongoing http://d.pr/i/qsnG and turn off the the registration form.


Kindra Goehler

November 25, 2013 at 8:34 am

Hi Dean,

If I set an event to ongoing, that does hide the messages, however it remains in event listings, etc. after the event is over. Basically I only want the messages about registration to show if I set a registration form.

Thank you,
Kindra


Sidney Harrell

November 25, 2013 at 2:49 pm

You could delete the contents of all the cases that you don’t want to display. So for expired, you would just delete line 54. Be sure to leave the case line and the break line.


Kindra Goehler

November 25, 2013 at 2:54 pm

Hi Sidney,

I don’t want to hide expired events though, I just want to hide messages for events that do not show the Registration Form.

Thanks,
Kindra


Sidney Harrell

November 25, 2013 at 5:03 pm

You could wrap each message in a conditional to check for whether the reg form is to be displayed, so line 54:

echo '<h3 class="expired_event">' . __('This event has passed.', 'event_espresso') . '</h3>';

would be changed to:

if ($display_reg_form == 'Y') {
  echo '<h3 class="expired_event">' . __('This event has passed.', 'event_espresso') . '</h3>';
}


Kindra Goehler

November 25, 2013 at 8:59 pm

Perfect! Thanks Sidney!

The support post ‘Hide Messages in Event Registration 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