Event Tickets: Move the Tickets View ("You have X RSVPs and X tickets for this Event. View your RSVPs and Tickets") to a different location on the Event Single page * Event Tickets Plus: Move the Attendees List ("Who's Attending") to a different location on the Event Single page
<?php
/**
* Event Tickets: Move the Tickets View ("You have X RSVPs and X tickets for this Event. View your RSVPs and Tickets") to a different location on the Event Single page
* Event Tickets Plus: Move the Attendees List ("Who's Attending") to a different location on the Event Single page
* From https://gist.github.com/cliffordp/f95b520a71635fd4e9d73eb2af73bd5e
**/
add_action( 'init', 'cliff_et_move_tickets_view_and_attendees_list' );
function cliff_et_move_tickets_view_and_attendees_list() {
/* Event Tickets Plus: Attendees List */
if ( class_exists( 'Tribe__Tickets_Plus__Attendees_List' ) ) {
// Remove the form from its default location (after the meta).
remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Attendees_List::instance(), 'render' ), 4 );
// Add the form to its new location (before the content).
/*
could use different actions to output to different places on event single page
-- see /wp-content/plugins/the-events-calendar/src/views/single-event.php for more actions
-- also listed below:
tribe_events_single_event_before_the_content
tribe_events_single_event_after_the_content
tribe_events_single_event_before_the_meta
tribe_events_single_event_after_the_meta
*/
add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets_Plus__Attendees_List::instance(), 'render' ) );
}
/* Event Tickets: Your Tickets View */
if ( class_exists( 'Tribe__Tickets__Tickets_View' ) ) {
// Remove the form from its default location (after the meta).
remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets__Tickets_View::instance(), 'inject_link_template' ), 4 );
// Add the form to its new location (before the content).
/*
could use different actions to output to different places on event single page
-- see /wp-content/plugins/the-events-calendar/src/views/single-event.php for more actions
-- also listed below:
tribe_events_single_event_before_the_content
tribe_events_single_event_after_the_content
tribe_events_single_event_before_the_meta
tribe_events_single_event_after_the_meta
*/
add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets__Tickets_View::instance(), 'inject_link_template' ) );
}
}