Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Don't Display REGISTER Button IF Registration Not Open? | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Don't Display REGISTER Button IF Registration Not Open?

Don't Display REGISTER Button IF Registration Not Open?

Posted: August 27, 2013 at 6:27 pm

Viewing 1 reply thread


LX

August 27, 2013 at 6:27 pm

This is referring to event_list_display.php

How can we edit the display so that a REGISTER button does not appear when Registration is not yet open. We still want all events to appear on that page; however, we only want those events for which registration is already open – so, if the registration start date is in the future, no button will appear – or alternatively, a button saying Not Yet Open appears.

This is the code that outputs the button in our event_list_display.php:


<span class="regbutton"> <?php echo do_shortcode('[ESPRESSO_CART_LINK event_id="'.$event_id.'" direct_to_cart=1 moving to cart_="Redirecting to cart..."]'); ?></span>

WP version 3.6
Event Espresso version 3.1.30.4P
Multiple Registration plugin version 1.0.4


Josh

August 28, 2013 at 10:43 am

Hi LX,

While I am not familiar with the customizations that were earlier made to the event_list_display.php that’s on your site, here’s an excerpt of the current version of Event Espresso’s event_list_display.php template where a switch statement was added that makes the registration button not display if registration is not open:

if ($display_reg_form == 'Y') {
			//Check to see if the Members plugin is installed.
			$member_options = get_option('events_member_settings');
			if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !is_user_logged_in() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {
				echo '<p class="ee_member_only">'.__('Member Only Event', 'event_espresso').'</p>';
			}else{

				switch ($status['status']) {

					case 'REGISTRATION_NOT_OPEN': 
					//don't show the buttons
					break; // end registration not open

					default: //This will display the registration form
			?>
				<p id="register_link-<?php echo $event_id ?>" class="register-link-footer">
					<a class="a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all" id="a_register_link-<?php echo $event_id ?>" href="<?php echo $registration_url; ?>" title="<?php echo stripslashes_deep($event_name) ?>"><?php _e('Register', 'event_espresso'); ?></a>
					<?php echo isset($cart_link) && $externalURL == '' ? $cart_link : ''; ?>
				</p>
	<?php 			break; // end default
				} // end switch
			}
		} else { 
	?>
			<p id="register_link-<?php echo $event_id ?>" class="register-link-footer">
				<a class="a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all" id="a_register_link-<?php echo $event_id ?>" href="<?php echo $registration_url; ?>" title="<?php echo stripslashes_deep($event_name) ?>"><?php _e('View Details', 'event_espresso'); ?></a> <?php echo isset($cart_link) && $externalURL == '' ? $cart_link : ''; ?>
			</p>
Viewing 1 reply thread

The support post ‘Don't Display REGISTER Button IF Registration Not Open?’ 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 - Staging Server