Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/5aeb6e2a3683f8a37d79 to your computer and use it in GitHub Desktop.
Save lorenzocaum/5aeb6e2a3683f8a37d79 to your computer and use it in GitHub Desktop.
Relocate the discount/promotions fields above the registration form in Event Espresso 3

This can be done by adjusting the some templates files. Here the steps to do so:

  1. Login to your WordPress site with your preferred SFTP or FTP client. FileZilla and Cyberduck are free options. Try Transmit for Mac

  2. Browse to this location: /wp-content/plugins/event-espresso/templates

  3. Locate the following files and download a copy of them to your local computer:

registration_page_display.php

registration_page.php

  1. Using your preferred FTP or SFTP client, browse to this location: /wp-content/uploads/espresso/templates

  2. Upload the two files that you recently downloaded to the location above

  3. Open the registration_page_display.php file for editing and go to line 189 through about line 207. You’ll see some coding like this:

<?php					
					//Coupons
	?>
						<input type="hidden" name="use_coupon[<?php echo $event_id; ?>]" value="<?php echo $use_coupon_code; ?>" />
						<?php
					if ( in_array( $use_coupon_code, array('Y','G','A')) && function_exists( 'event_espresso_coupon_registration_page' )) {
						echo event_espresso_coupon_registration_page($use_coupon_code, $event_id);
					}
					//End coupons display
							
					//Groupons
	?>
						<input type="hidden" name="use_groupon[<?php echo $event_id; ?>]" value="<?php echo $use_groupon_code; ?>" />
						<?php
					if ( $use_groupon_code == 'Y' && function_exists( 'event_espresso_groupon_registration_page' )) {
						echo event_espresso_groupon_registration_page($use_groupon_code, $event_id);
					}
					//End groupons display					
	?>
  1. Copy that snippet of coding and then remove it.

  2. At around line 184, you'll see the following coding:

<?php
					//Outputs the custom form questions. This function can be overridden using the custom files addon
					echo event_espresso_add_question_groups( $question_groups, '', NULL, FALSE, array( 'attendee_number' => 1 ), 'ee-reg-page-questions' );
	?>
						</div>

Add the coupons coding snippet that you copied in step 6 just above it. Here is the end result after relocating the coding:

<?php					
					//Coupons
	?>
						<input type="hidden" name="use_coupon[<?php echo $event_id; ?>]" value="<?php echo $use_coupon_code; ?>" />
						<?php
					if ( in_array( $use_coupon_code, array('Y','G','A')) && function_exists( 'event_espresso_coupon_registration_page' )) {
						echo event_espresso_coupon_registration_page($use_coupon_code, $event_id);
					}
					//End coupons display
							
					//Groupons
	?>
						<input type="hidden" name="use_groupon[<?php echo $event_id; ?>]" value="<?php echo $use_groupon_code; ?>" />
						<?php
					if ( $use_groupon_code == 'Y' && function_exists( 'event_espresso_groupon_registration_page' )) {
						echo event_espresso_groupon_registration_page($use_groupon_code, $event_id);
					}
					//End groupons display					
	?>
							
<?php
					//Outputs the custom form questions. This function can be overridden using the custom files addon
					echo event_espresso_add_question_groups( $question_groups, '', NULL, FALSE, array( 'attendee_number' => 1 ), 'ee-reg-page-questions' );
	?>
						</div>

Be sure to save changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment