This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Description: This snippet will enable you to have an iCal export of all this year's events | |
* when using this url: | |
* http://example.com/events/?ical=1&tribe_display=custom | |
* | |
* Formats you can use: | |
* Simple: exports events of this year, i.e. Jan 1st to Dec 31 of current year | |
* http://example.com/events/?ical=1&tribe_display=custom | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The Events Calendar PRO: Make tribe_is_week() return TRUE even for | |
* tribe_events shortcode. | |
* | |
* @link https://gist.github.com/cliffordp/7b48b2e6a0562709cf9d069f38cfdcee | |
* @link https://gist.github.com/GeoffEW/dff981933c950aebc3045b827eddc101 or something like it could be used alongside this snippet. | |
* @link https://central.tri.be/issues/91891 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The Events Calendar: Redirect all site searches to be Tribe Bar Keyword searches. | |
* | |
* Should only be used if you want only Event posts to appear in general search | |
* queries. Again, Posts, Pages, and custom post types allowed to appear in | |
* search results will no longer be included--ONLY Events will appear. | |
* Example redirect: | |
* From: http://example.dev/?s=Weekly+Screening | |
* To: http://example.dev/events/?tribe-bar-search=Weekly%20Screening |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* BCC event organizers email on all Event Tickets' RSVP and commerce ticket emails so they get a copy of it too | |
*/ | |
function bcc_all_event_organizers( $headers, $event_id, $order_id ) { | |
//check if has organizer | |
if ( !tribe_has_organizer( $event_id ) ) { | |
return $headers; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* The Events Calendar Remove Events from All Views (Except Category Pages) | |
* add to theme's functions.php file | |
* @version 4.5.5 | |
* replace these example slugs with your event category slugs: array( 'family-fun', 'bbq' ) | |
*/ | |
add_action( 'pre_get_posts', 'tribe_exclude_events_categories_all_views' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* An example for how to dequeue a script | |
* | |
* Obtain the handle of your script by searching through the code, and then | |
* add a wp_deregister_script() function call for that handle. | |
*/ | |
function tribe_dequeue_script_example() { | |
wp_deregister_script( 'tribe-events-jquery-resize' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Event Tickets Plus - Add other WooCommerce Product to Cart when WooCommerce Ticket is added to cart | |
* | |
* @link https://wordpress.org/plugins/woocommerce-product-dependencies/ May be a better and easier solution !!! !!! !!! (But I haven't tried it.) | |
* | |
* !!! Before using, edit the variables in this function according to your needs!!! | |
* Could maybe also do the inverse (if ticket product is removed from cart, also remove the chained product). | |
* | |
* From https://gist.github.com/cliffordp/30481ca323012e298418095476d49337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Event Tickets - Remove Checked-In Attendees from wp-admin table | |
* | |
* Can help the Attendees List table screen's performance after some of the attendees have been checked in. | |
* Modified from Barry's original version on May 24, 2017, to support all ticket types. | |
* Ideas: only do this if a specific query parameter exists, or only do this if a button is clicked (but then the point about this being a performance improvement would no longer be valid) | |
* | |
* @param $query | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function tribe_custom_theme_text_with_context ( $translation, $text, $context, $domain ) { | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* BCC multiple email addresses, including the site admin email address, on all Event Tickets' RSVP ticket emails so they get a copy of it too | |
* | |
* Updated 2018-01-18 for Event Tickets 4.5.2+ | |
* HOWEVER, this has been tested and we think there might be an issue with | |
* the version of PHPMailer (what wp_mail() uses) included with WordPress, which | |
* is why BCCs are not working. | |
* Therefore, you can use this other snippet for how to initiate a new, separate | |
* email message to the Organizer (but it could be customized to go to someone |
NewerOlder