Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
andrasguseo / mini-calendar-widget.css
Created Jul 9, 2021
TEC > Styling the v2 mini calendar widget as v1.
View mini-calendar-widget.css
.tribe-events-widget-events-month {
padding-left: 0 !important;
padding-right: 0 !important;
}
.tribe-events-widget-events-month .tribe-events-header .tribe-events-c-top-bar__nav-list {
justify-content: center !important;
}
.tribe-events-widget-events-month .tribe-events-header .tribe-events-c-top-bar__nav-link--prev {
margin-right: 20px;
@andrasguseo
andrasguseo / day.php
Last active Jul 9, 2021 — forked from skyshab/day.php
Add a class to month view day-cells when they contain events, and when they are not the main month.
View day.php
<?php
/**
* View: Month View - Day
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe/events/v2/month/calendar-body/day.php
*
* See more documentation about our views templating system.
*
* @link http://evnt.is/1aiy
@andrasguseo
andrasguseo / filter-events-on-author-page.php
Created May 17, 2021
TEC > Filter out events from the author on the author page
View filter-events-on-author-page.php
<?php
/*
* Description: Events created by an author appear on the author archives page for that author.
* This snippet filters these out.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Eric
* Last updated: 2021-05-17
*/
View ea-skeleton.php
<?php
/**
* Skeleton code for modifying imported event content
*/
add_action( 'tribe_aggregator_before_insert_posts', 'add_wp_content_filter' );
function add_wp_content_filter() {
add_filter( 'wp_insert_post_data', 'filter_post_data' );
}
@andrasguseo
andrasguseo / gigpress-end-date-schema.php
Last active Jul 21, 2021
GigPress > Add an end date to the event schema markup.
View gigpress-end-date-schema.php
<?php
/*
* Description: Add an end date to the event schema markup.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: GigPress
* Author: Andras Guseo
* Last updated: 2021-07-21
*/
@andrasguseo
andrasguseo / ical-description-with-markup.php
Created Apr 13, 2021
TEC > Add event description with markup to the iCal export feed.
View ical-description-with-markup.php
<?php
/*
* Description: Add event description with markup to the iCal export feed.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: 2021-04-13
*/
@andrasguseo
andrasguseo / gist:68fd83a3d5504a096cc1ec849901017a
Created Mar 17, 2021
TEC > Trim the event description in the iCal export feed if it is too long
View gist:68fd83a3d5504a096cc1ec849901017a
<?php
/*
* Description: Trim the event description in the iCal export feed if it is too long.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: 2021-03-17
*/
@andrasguseo
andrasguseo / tec-remove-url-from-ical-feed.php
Created Mar 12, 2021
TEC > Remove the event post URL from the event iCal export feed
View tec-remove-url-from-ical-feed.php
<?php
/*
* Description: Remove the event post URL from the event iCal export feed
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: 2021-03-12
*/
@andrasguseo
andrasguseo / tec_labs_event_featured_image_to_ticket_header.php
Created Mar 8, 2021
Event Tickets Extension: Featured Image as Ticket Header
View tec_labs_event_featured_image_to_ticket_header.php
@andrasguseo
andrasguseo / use-us-state-abbreviations.php
Last active Jan 20, 2021
TEC > Use abbreviations in US state names
View use-us-state-abbreviations.php
<?php
/* Description: In the US state dropdown the abbreviations will be used instead of the full state name.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: 2021-01-20
*/
add_filter( 'tribe_us_states', 'tec_states_abbrev_only' );