Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
andrasguseo / tdm-purge-tec.php
Last active September 23, 2016 15:31
TEC: Purge DB: Add-on for The Events Calendar. Purges the deleted events from the database, 50 at a time.
<?php
/**
* Plugin Name: TEC: Purge DB
* Plugin URI: http://www.theeventscalendar.com
* Description: Add-on for The Events Calendar. Purges the deleted events from the database, 50 at a time.
* Version: 1.0
* Author: Andras Guseo | The Events Calendar
* Author URI: http://www.theeventscalendar.com
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@andrasguseo
andrasguseo / single-event.php
Created September 29, 2016 09:18
List view single event page for Manuela
<?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
*
* @package TribeEventsCalendar
*
*/
@andrasguseo
andrasguseo / venue.php
Created September 29, 2016 09:27
Single event view, event venue meta for Manuela
<?php
/**
* Single Event Meta (Venue) Template
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe-events/modules/meta/venue.php
*
* @package TribeEventsCalendar
*/
@andrasguseo
andrasguseo / functions.php
Created September 29, 2016 09:45
For jussibr - The Events Calendar Remove Events from Month and List Views
/*
* The Events Calendar Remove Events from Month and List Views
* add coding to theme's functions.php
* @version 3.12
* modify here with event category slugs: array( 'concert', 'convention' )
*/
add_action( 'pre_get_posts', 'tribe_exclude_events_category_month_list' );
function tribe_exclude_events_category_month_list( $query ) {
if ( isset( $query->query_vars['eventDisplay'] ) && ! is_singular( 'tribe_events' ) && ! tribe_is_community_my_events_page() ) {
@andrasguseo
andrasguseo / single-event.php
Created October 7, 2016 09:19
For Carla - add city to photo view 2
<?php
/**
* Photo View Single Event
* This file contains one event in the photo view
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/photo/single_event.php
*
* @package TribeEventsCalendar
*
*/
@andrasguseo
andrasguseo / functions.php
Last active October 13, 2016 15:17
For Tamara - show venue image and organizer image on single event page
<?php
/* The Events Calendar Pro
* Show venue image and organizer image on single event page
* Paste the below in your child theme's functions.php file
*
* For $size you can use: thumb, medium, large, full
* For $link you can use: true or false; links to the event page.
*/
function add_venue_image_to_single_event_page() {
@andrasguseo
andrasguseo / functions.php
Created October 31, 2016 21:00
For Robert - Show only today's events in all views, when there is no filtering for date
<?php
/*
* For the following plugins:
* The Events Calendar
*
* With this snippet you will only see today's events in any
* calendar view, if there is no date set in the filter bar.
* If there are no events, then "There were no results found."
* is shown.
* Add to your child theme's functions.php file
@andrasguseo
andrasguseo / functions.php
Last active November 8, 2016 22:46
For Fernanco - Add "billing company name" to CSV export of Attendees
<?php
/**
* Add billing company name to CSV export
*/
function tribe_csv_export_add_company_column ( $columns ){
return array_merge ( $columns, array('company' => 'Company') );
}
@andrasguseo
andrasguseo / functions.php
Last active November 30, 2016 15:53
Modify query order when including events in blog post loop
/*
* Template to modify query order when including events in blog post loop
* For The Events Calendar
* Paste into functions.php
*/
add_action( 'pre_get_posts', 'order_by_modified' );
function order_by_modified( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
@andrasguseo
andrasguseo / tec-hide-weekend.css
Last active December 22, 2016 23:54
Hide Saturday and Sunday in month view in The Events Calendar
.tribe-events-month .tribe-events-calendar thead th:nth-child(6),
.tribe-events-month .tribe-events-calendar thead th:nth-child(7),
.tribe-events-month .tribe-events-calendar tbody td:nth-child(6),
.tribe-events-month .tribe-events-calendar tbody td:nth-child(7) {
display: none;
}