Skip to content

Instantly share code, notes, and snippets.

@jentheo
jentheo / meta.php
Created July 16, 2019 02:43
BuddyBoss meta.php with original map code
<?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
@jentheo
jentheo / single-event.php
Created June 15, 2019 03:27
Move address below image
<?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
*
*/
@jentheo
jentheo / june-calendar.php
Created May 27, 2019 14:01
Set calendar to June in month view
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 );
}
}
@jentheo
jentheo / set-default-events.php
Created May 24, 2019 23:41
Change start date for events on the main events page
*
* 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
@jentheo
jentheo / hide-recurring-events.php
Created May 24, 2019 13:58
Hide recurring event instances in list views
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 );
@jentheo
jentheo / past-events-on-categories.php
Created May 17, 2019 14:41
Show past events on event category pages
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()
@jentheo
jentheo / loop-grid.php
Created May 13, 2019 16:38
Show week numbers in month view
<?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
*
@jentheo
jentheo / next-day-event-link.php
Last active May 7, 2019 15:13
Next day event link
@jentheo
jentheo / temp-fix-embedded-month-view-day-links.php
Last active May 2, 2019 16:04 — forked from barryhughes/temp-fix-embedded-month-view-day-links.php
Provides a temp workaround to help ensure the more event/view all X event links within month view are functional