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' ); |
View add-purchase-time.php
<?php | |
/* Description: Add purchase time on 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-01-20 | |
*/ | |
// Adding an extra column header for Purchase time |
View additional-ticket-email-content.php
<?php | |
/* Adds conttent to the top of the email */ | |
add_action( 'tribe_tickets_ticket_email_top', 'my_email_top_content' ); | |
function my_email_top_content() { | |
echo "My custom content"; | |
} | |
/* Adds conttent at the top of each ticket */ |
View exclude_content_from_event_search.php
<?php | |
/* Description: Excludes the event description and excerpt fields from the search. | |
* Usage: Paste the below snippet into your active (child) theme's functions.php file | |
* | |
* Plugin: The Events Calendar | |
* Author: Barry Hughes, Andras Guseo | |
* Last updated: 2020-12-21 | |
*/ | |
function modify_event_searches( $search, WP_Query $wp_query ) { | |
if ( empty( $search ) ) return; |
View ical-strip-shortcodes.php
<?php | |
/** | |
* Description: This snippet will try to strip the shortcodes from the post content | |
* in the iCal export feed. | |
* | |
* Usage: Copy the snippet into your child theme's functions.php file. | |
* | |
* Plugins: The Events Calendar | |
* Author: Andras Guseo | |
* Last updated: November 4, 2020 |
View ical-content-to-excerpt.php
<?php | |
/** | |
* Description: This snippet will change the post conetent to the post excerpt | |
* in the iCal export feed. | |
* Note, if the excerpt is empty, it will also be empty in the export. | |
* | |
* Usage: Copy the snippet into your child theme's functions.php file. | |
* | |
* Plugins: The Events Calendar | |
* Author: Andras Guseo |
View single-event.php
<?php | |
/** | |
* List View Single Event | |
* This file contains one event in the list view | |
* | |
* This override will add the organizer(s) after the event information | |
* | |
* Place this template file in your own theme / child theme by creating a file at: | |
* [your-theme]/tribe-events/list/single-event.php | |
* |
View event-organizer.php
<?php | |
/** | |
* Block: Event Organizer | |
* | |
* This override will add clickable URLs to the following: | |
* - Event organizer name | |
* - Event organizer phone number | |
* - Event organizer email address | |
* | |
* Place this template file in your own theme / child theme by creating a file at: |
View dequeue-tribe-events-styles-scripts.php
<?php | |
/** | |
* Detect Tribe Events page | |
* @link https://wordpress.stackexchange.com/questions/340515/writing-a-function-to-detect-an-event | |
*/ | |
function is_tribe_calendar() { | |
if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular( 'tribe_events' )) { | |
return true; | |
} | |
else { |
NewerOlder