Skip to content

Instantly share code, notes, and snippets.

View tec-modify-event-schema.php
<?php
/* Description: Modify the event schema
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: 2022-09-23
*/
add_filter( "tribe_json_ld_event_object", 'tec_custom_event_schema', 10, 3 );
@andrasguseo
andrasguseo / assign-venue-to-event-on-import.php
Created Sep 15, 2022
EA > Assign a venue (ID) to an event on import
View assign-venue-to-event-on-import.php
<?php
/*
* Description: Adds a venue to the imported event if there is none.
*
* Usage: modify the URL at the end of the code based on your needs
*
* Version: 1.0
* Plugins: The Events Calendar (Event Aggregator)
* Author: Andras Guseo
* Last updated: April 17, 2018
@andrasguseo
andrasguseo / ea-permanently-delete-all-ignored-button.php
Created Jul 15, 2022
EA > Adds a "Permanently Delete All" button to the ignored events list.
View ea-permanently-delete-all-ignored-button.php
<?php
/**
* Plugin Name: Event Aggregator Extension: Permanently Delete All Ignored Events Button
* Description: Adds a "Permanently Delete All" button to the ignored events list.
* Version: 0.1
* Author: The Events Calendar
* Author URI: https://evnt.is/1971
* License: GPL version 3 or any later version
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*
@andrasguseo
andrasguseo / ea-delete-all-ignored-bulk-action.php
Last active Jul 15, 2022
EA > Option to delete all ignored events with one click.
View ea-delete-all-ignored-bulk-action.php
<?php
/**
* This will add an option to the bulk actions dropdown on the events admin, when looking
* at the events on the ignored list.
* Select at least one event and then choose "Delete Permanently All" to delete all ignored
* events permanently.
* Test first. Create a backup. No guarantees!
*/
add_filter('bulk_actions-edit-tribe_events', 'tec_add_empty_ignored_bulk_action', 9999999 );
@andrasguseo
andrasguseo / functions.php
Created Mar 11, 2022
ET > Tickets Commerce > Add purchase time and Transaction ID columns to the Attendees page
View functions.php
<?php
// Adding an extra column header for Purchase time and Transaction ID
add_filter( 'tribe_tickets_attendee_table_columns', 'tec_et_purchase_time_column' );
function tec_et_purchase_time_column( $columns ) {
/**
* Choose below after which column you would like to add the purchase time
* 'cb', 'ticket', 'primary_info', 'security', 'status', 'check_in'
*/
@andrasguseo
andrasguseo / csv-import-event-slug-column.php
Last active Mar 1, 2022
TEC > Add an extra column to the CSV import to allow setting the event slug
View csv-import-event-slug-column.php
<?php
/* Description: Add the "Event Slug" column to CSV import.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar
* Author: Andras Guseo
* Last updated: 2022-03-01
*/
// Add the column name to the dropdown
@andrasguseo
andrasguseo / et-add-optout.php
Created Nov 16, 2021
ET > Add the optout value on the Attendees admin page in Event Tickets
View et-add-optout.php
<?php
/* Description: Add the customer optout value to the Attendees admin page in Event Tickets
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: Event Tickets
* Author: Andras Guseo
* Last updated: 2021-11-16
*/
// Adding an extra column header
@andrasguseo
andrasguseo / quantity.php
Created Nov 9, 2021
ET > Template override to show the full stock next to the available stock, for example "9 of 10 available"
View quantity.php
<?php
/**
* Block: Tickets
* Extra column, available Quantity
*
* This template override will add the total capacity to the available number of tickets.
* Instead of just showing "9 available" it will now show "9 of 10 available".
*
* Screenshot: https://dl.dropboxusercontent.com/s/bxcynjuociqczgp/shot_211109_142220.jpg
*
@andrasguseo
andrasguseo / custom-ce-required-fields.php
Created Oct 5, 2021
CE > Remove event description from required fields
View custom-ce-required-fields.php
<?php
/*
* Description: Removes event description as a required field from the Community Events
* submission form.
* Usage: Paste the below snippet into your active (child) theme's functions.php file
*
* Plugin: The Events Calendar: Community Events
* Author: Andras
* Last updated: 2021-10-06
*/
@andrasguseo
andrasguseo / event-list-widget-v1.css
Last active Jul 27, 2022
TEC > Styling the v2 event list widget as v1.
View event-list-widget-v1.css
/* Separator below an event */
.tribe-events-widget-events-list__events .tribe-events-widget-events-list__event-row {
border-bottom: 1px dotted#666;
padding-bottom: 10px;
}
/* Date box height and margin */
.tribe-events-widget-events-list__events .tribe-events-widget-events-list__event-date-tag-datetime {
height: unset !important;
margin-right: 1em;