Genesis Framework and Attendee Registration

Description

As of ET/ET+ 4.9 The attendee details are now collected on a new, separate screen instead of the event page where the attendee form used to be. The default slug for this page is 'attendee-registration'.

When using a theme based on the Genesis Framework and having a specific setting, the Attendee Registration page will not show up properly. It will show a kind of an excerpt of that page.

The setting in question can be found under Genesis > Theme Settings > Content Archive.

When the setting is 'Display->Excerpt' or the content limit is higher than 0 - basically anything else than 'Display->Entry Content' and 'Limit content to 0 characters' - then the issue will be visible.

Here is the solution to fix that.

Usage

Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code).

Plugins

Event Tickets, Event Tickets Plus

Snippet

// Fix for the attendee registration page glitch with Genesis
add_action( 'genesis_before_loop', 'tribe_tickets_fix_etp_attendee_registration_page_for_genesis' );
function tribe_tickets_fix_etp_attendee_registration_page_for_genesis() {
	if ( ! function_exists( 'tribe' ) ) {
		return;
	}
	try {
		if ( tribe( 'tickets.attendee_registration' )->is_on_page() ) {
			remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
			add_action( 'genesis_entry_content', 'do_post_content' );
		}
	} catch ( Exception $e ) {}
}
function do_post_content() {
	the_content();
}

Notes

  • Originally written in December 2018
  • Tested with Event Tickets / Event Tickets Plus 4.9
  • Author: András Guseo, Barry Hughes

Disclaimer

As with all of our recipes, please note that we share this in the hope it will be useful but without any guarantees or commitments. If you wish to use it, it is your responsibility to test it first of all and adapt it to your needs (or find someone who can do so on your behalf). We are unable to provide further support in relation to this recipe.