Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active February 27, 2017 18:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/f95b520a71635fd4e9d73eb2af73bd5e to your computer and use it in GitHub Desktop.
Save cliffordp/f95b520a71635fd4e9d73eb2af73bd5e to your computer and use it in GitHub Desktop.
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' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment