Moving the Eventbrite Tickets box

By default, Eventbrite Tickets places the ticket form just under the event details or "meta" box. Though this is generally a nice position, some users may prefer to move it further up the page. Thankfully, doing so is pretty easy and in this tutorial, we'll look at a useful snippet to help you do just that.

The snippet below can be added to your theme's functions.php file. Once it's in place, it will move the ticket form to a position just above the event meta box.

add_action( 'init', 'move_eb_ticket_form' );

function move_eb_ticket_form() {
	$display_tickets = array( tribe( 'eventbrite.main' ), 'print_ticket_form' );
	remove_action( 'tribe_events_single_event_after_the_meta', $display_tickets, 9 );
	add_action( 'tribe_events_single_event_before_the_meta', $display_tickets );
}

You might prefer some other location on the event page. If so, you'll need to change this line of the snippet:

add_action( 'tribe_events_single_event_before_the_meta', $display_tickets );

Just as the first parameter (tribe_events_single_event_before_the_meta) suggests, this sets the ticket box to display on single events page before the meta (i.e. before the event details). If we wished to make it display before the event description we'd simply change that line to:

add_action( 'tribe_events_single_event_before_the_content', $display_tickets );

Now you can move the tickets box wherever you need it on your events page! If you have any trouble using the snippet, you can always post to our help desk and we will do our best to help out.