Last active
May 18, 2018 15:18
-
-
Save barryhughes/bf2105d92acba380364a56b21438c72b to your computer and use it in GitHub Desktop.
Remove RSVP ticket form from single events/posts, via code that can be added to a theme's functions.php file (where that's appropriate)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This code can be added to a theme's functions.php file to remove | |
// the frontend ticket form (RSVPs only) | |
if ( function_exists( 'tribe' ) && class_exists( 'Tribe__Tickets__RSVP' ) ) { | |
// Remove the RSVP ticket form from blog posts, etc | |
remove_filter( 'the_content', array( | |
tribe( 'tickets.rsvp' ), 'front_end_tickets_form_in_content' | |
), 11 ); | |
// Remove the RSVP ticket form from single event posts | |
remove_action( 'tribe_events_single_event_after_the_meta', array( | |
tribe( 'tickets.rsvp' ), 'maybe_add_front_end_tickets_form' | |
), 5 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment