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 if(get_field('custom_event_date_display')) { /*check for Advanced Custom Fields true/false field (change the field name if necessary)*/ ?> | |
| <dt class="event-label event-label-start"><?php _e('Start:', 'tribe-events-calendar'); ?></dt> | |
| <dd class="event-meta event-meta-start"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?></dd> | |
| <dt class="event-label event-label-end"><?php _e('End:', 'tribe-events-calendar'); ?></dt> | |
| <dd class="event-meta event-meta-end"><meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_end_date( null, false, 'Y-m-d' ); ?></dd> | |
| <?php } elseif (tribe_get_start_date() !== tribe_get_end_date() ) { ?> | |
| <dt class="event-label event-label-start"><?php _e('Start:', 'tribe-events-calendar'); ?></dt> | |
| <dd class="event-meta event-meta-start"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( |
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_filter('wp_title', 'custom_seo_title'); | |
| function custom_seo_title($title) { | |
| if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
| $title = 'Events Calendar'; | |
| } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
| $title = 'Events Calendar' . ' » ' . single_term_title('', false); | |
| } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
| $title = 'Events List'; | |
| } elseif( tribe_is_event() && is_single() ) { // Single Events |
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_filter(‘the_title’, ‘your_new_title’, 10); | |
| function new_title($title, $id) { | |
| global $post; | |
| if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
| $title = 'Events Calendar'; |
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
| /*-----------------------------------------------------------------------------------*/ | |
| /* Set Post Titles in Genesis | |
| /*-----------------------------------------------------------------------------------*/ | |
| add_action('genesis_post_title','custom_do_post_title'); | |
| function custom_do_post_title() { | |
| $tribe_ecp = TribeEvents::instance(); | |
| $title = get_the_title(); | |
| if ( strlen( $title ) == 0 ) |
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
| if(is_page('Migrate')) { | |
| // example how to get only selected row for particular post id | |
| //$myrows = $wpdb->get_results("SELECT * FROM wp_ec3_schedule WHERE post_id = 7693", ARRAY_N); | |
| // get all the data from the ec3 event calendar | |
| global $wpdb; | |
| $myrows = $wpdb->get_results("SELECT * FROM wp_ec3_schedule", ARRAY_N); | |
| //var_dump($myrows); |
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( 'pre_get_posts', 'change_post_count_in_day_view' ); | |
| function change_post_count_in_day_view( $query ) { | |
| if ( $query->query_vars['eventDisplay'] == 'day' && empty( $query->query_vars['suppress_filters'] ) ) { | |
| $query->set('posts_per_page', 1); | |
| } | |
| return $query; | |
| } |
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_filter('tribe_get_events_title','custom_get_events_title'); | |
| function custom_get_events_title( $depth=true ) { | |
| global $wp_query; | |
| $tribe_ecp = TribeEvents::instance(); | |
| $title = __('Class Schedule', 'tribe-events-calendar'); | |
| // TODO: Use the displayed dates for the title | |
| /* | |
| if ( tribe_is_upcoming() || isset( $_REQUEST['tribe-bar-date'] ) ) { |
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 | |
| add_action( 'pre_get_posts', 'show_one_year_of_events' ); | |
| function show_one_year_of_events( $query ) { | |
| if ( $query->is_feed && empty( $query->query_vars['suppress_filters'] ) ) { | |
| $query->set('meta_query', array( | |
| 'relation' => 'OR', | |
| array( | |
| 'key' => '_EventStartDate', |
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_filter('tribe_get_events_title', 'my_get_events_title'); | |
| function my_get_events_title($title) { | |
| if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
| return $title; | |
| } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
| return $title; | |
| } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
| return 'Events List'; | |
| } elseif( tribe_is_event() && is_single() ) { // Single Events | |
| return $title; |