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 | |
| /** | |
| * Tries to force the minicalendar widget to show the month of the next upcoming event by default, rather | |
| * than simply showing the current month (which might be empty). | |
| */ | |
| class Tribe_Advance_Minical | |
| { | |
| protected $target_date = false; | |
| /** |
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 | |
| /*-----------------------------------------------------------------------------------*/ | |
| /* Conditional Logic to Detect Various Event Related Views/Pages | |
| /*-----------------------------------------------------------------------------------*/ | |
| if( tribe_is_month() && !is_tax() ) { // Month View Page | |
| echo 'were on the month view page'; | |
| } elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
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 | |
| // Singular | |
| add_filter( 'tribe_event_label_singular', 'event_display_name' ); | |
| function event_display_name() { | |
| return 'Meeting'; | |
| } | |
| add_filter( 'tribe_event_label_singular_lowercase', 'event_display_name_lowercase' ); | |
| function event_display_name_lowercase() { | |
| return 'meeting'; |
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
| .tribe-events-meta-group dd.location span.country-name { | |
| position: absolute; | |
| top: -10000px; | |
| visibility: hidden; | |
| } |
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
| add_action( 'wp_head', 'community_add_css' ); | |
| function community_add_css() { | |
| if ( tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { | |
| ?> | |
| <style> | |
| YOUR CSS STYLES GO HERE | |
| </style> | |
| <?php | |
| } | |
| } |
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 | |
| /* | |
| * EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR | |
| * See the codex to learn more about WP text domains: | |
| * http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
| * Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
| */ | |
| function tribe_custom_theme_text ( $translation, $text, $domain ) { | |
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
| /** | |
| * Redirect event category requests to list view. | |
| * | |
| * @param $query | |
| */ | |
| function use_list_view_for_categories( $query ) { | |
| // Disregard anything except a main archive query | |
| if ( is_admin() || ! $query->is_main_query() || ! is_archive() ) return; | |
| // We only want to catch *event* category requests being issued |
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
| /** | |
| * Enable custom field support for organizer posts. | |
| * | |
| * @param array $args | |
| * @return array | |
| */ | |
| function tribe_organizers_custom_field_support( $args ) { | |
| $args['supports'][] = 'custom-fields'; | |
| return $args; | |
| } |
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
| /** | |
| * Enable custom field support for venue posts. | |
| * | |
| * @param array $args | |
| * @return array | |
| */ | |
| function tribe_venues_custom_field_support( $args ) { | |
| $args['supports'][] = 'custom-fields'; | |
| return $args; | |
| } |
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
| /** | |
| * Outputs all WP post meta fields (except those prefixed "_"), feel | |
| * free to tweak the formatting! | |
| */ | |
| function show_wp_custom_fields() { | |
| foreach ( get_post_meta( get_the_ID() ) as $field => $value ) { | |
| $field = trim( $field ); | |
| if ( is_array( $value ) ) $value = implode( ', ', $value ); | |
| if ( 0 === strpos( $field, '_' ) ) continue; // Don't expose "private" fields | |
| echo '<strong>' . esc_html( $field ) . '</strong> ' . esc_html( $value ) . '<br/>'; |