Created
July 10, 2015 23:52
-
-
Save elimn/0e74ca00e5b492a4c57a to your computer and use it in GitHub Desktop.
MT | TEC | Hide "Tribe Events After HTML" content on select pages
This file contains hidden or 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 | |
| /* | |
| * Hide Tribe Events After HTML content on select pages | |
| * Find "Tribe Events After HTML" field in WP Admin > Events > Settings > Display | |
| * IMPORTANT: Uncomment the pages you wish to hide the form on, else this does nothing. | |
| */ | |
| function tribe_after_html_hider ( $html ) { | |
| // Uncomment to hide "after HTML" on the single event pages | |
| // if ( is_single() && tribe_is_event() ) $html = ""; | |
| // Uncomment to hide on Month view | |
| // if ( tribe_is_month() ) $html = ""; | |
| // Uncomment to hide on List view | |
| // if ( tribe_is_upcoming() || tribe_is_past() ) $html = ""; | |
| // Uncomment to hide on Community pages | |
| // if ( tribe_is_community_edit_event_page() ) $html = ""; | |
| // if ( tribe_is_community_my_events_page() ) $html = ""; | |
| return $html; | |
| } | |
| add_filter( 'tribe_events_after_html', 'tribe_after_html_hider', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment