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 | |
/** | |
* Single Event Meta Template | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe-events/modules/meta.php | |
* | |
* @version 4.6.10 | |
* | |
* @package TribeEventsCalendar |
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 | |
/** | |
* List View Single Event | |
* This file contains one event in the list view | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php | |
* | |
* @version 4.6.19 | |
* | |
*/ |
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
add_filter("tribe_events_month_daily_events_query_args", function($args){ | |
if(isset($args["featured"]) && $args["featured"] === false){ | |
unset($args["featured"]); | |
} | |
return $args; | |
}); |
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
function tribe_set_default_date( $wp_query ) { | |
// Only run on main event queries | |
if ( ! tribe_is_event_query() || ! $wp_query->is_main_query() || $wp_query->get( 'eventDate' ) != '' ) return; | |
$date = '2019-06-01'; | |
if ( | |
tribe_is_month() | |
) { | |
$wp_query->set( 'eventDate', $date ); | |
} | |
} |
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
* | |
* Set the default date for views like List and Month | |
* Modify the $date variable below to set your date | |
*/ | |
function tribe_set_default_date( $wp_query ) { | |
// Only run on main event queries | |
if ( ! tribe_is_event_query() || ! $wp_query->is_main_query() || $wp_query->get( 'eventDate' ) != '') return; | |
// Set this to the date you want shown, in YYYY-MM-DD format | |
$date = '2009-01-01'; | |
// Select which TEC views you want this to apply to by uncommenting them |
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
function tribe_hide_recurring_events( $hide, $query ) { | |
if ( tribe_is_list_view() || tribe_is_photo() || tribe_is_map() ) { | |
$hide = true; | |
} | |
return $hide; | |
} | |
add_filter( 'tribe_events_pro_should_hide_recurrence', 'tribe_hide_recurring_events', 10, 2 ); |
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
function tribe_set_default_date( $wp_query ) { | |
// Only run on main event queries | |
if ( ! tribe_is_event_query() || ! $wp_query->is_main_query() || $wp_query->get( 'eventDate' ) != '') return; | |
// Set this to the date you want shown, in YYYY-MM-DD format | |
$date = '2000-01-01'; | |
// Select which TEC views you want this to apply to by uncommenting them | |
if ( | |
tribe_is_event_category() |
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 | |
/** | |
* Month View Grid Loop | |
* This file sets up the structure for the month grid loop | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/month/loop-grid.php | |
* | |
* @package TribeEventsCalendar | |
* @version 4.6.19 | |
* |
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 | |
$current_day = tribe_get_start_date( null, false, 'Y-m-d' ); | |
$next_day = date( 'Y-m-d', strtotime( $current_day. ' + 1 days' ) ); | |
$day_after = date( 'Y-m-d', strtotime( $next_day. ' + 1 days' ) ); | |
$prev_day = date( 'Y-m-d', strtotime( $current_day. ' - 1 days' ) ); | |
$current_event_categories = get_the_terms( $post, 'tribe_events_cat' ); | |
for ( $i = 0; $i < count( $current_event_categories ); $i++ ) { | |
$current_event_category = $current_event_categories[ $i ]->slug; |
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 | |
/** | |
* Ensure that month view 'view all X events' on this day links are functional. | |
* | |
* This is a temporary workaround for a bug in Events Calendar PRO 4.4.20.1. | |
*/ | |
add_filter( 'tribe_get_day_link', function( $url, $date ) { | |
// Intervention is only needed following navigation by ajax | |
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { | |
return $url; |
NewerOlder