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: Move the Tickets View ("You have X RSVPs and X tickets for this Event. View your RSVPs and Tickets") to a different location on the Event Single page | |
* Event Tickets Plus: Move the Attendees List ("Who's Attending") to a different location on the Event Single page | |
* From https://gist.github.com/cliffordp/f95b520a71635fd4e9d73eb2af73bd5e | |
**/ | |
add_action( 'init', 'cliff_et_move_tickets_view_and_attendees_list' ); | |
function cliff_et_move_tickets_view_and_attendees_list() { | |
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 | |
/** | |
* Prevent calendar export links from showing anywhere on the front-end. | |
* | |
* | |
*/ | |
class Tribe__Events__Remove__Export__Links { | |
public function __construct() { | |
add_action( 'init', array( $this, 'single_event_links' ) ); |
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
function my_custom_event_order( $query ) { | |
if ( $query->is_home() && $query->is_main_query() ) { | |
$query->set( 'post_type','tribe_events'); | |
$query->set( 'orderby','date'); | |
$query->set( 'order','DESC'); | |
return $query; | |
} | |
} | |
add_action( 'pre_get_posts', 'my_custom_event_order' ); |
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 | |
/** | |
* Plugin name: Event Tickets Meta Hawk | |
* Description: Lets site administrators soar over attendee meta data supplied by attendees then swoop down, hawk-like, to change it. Proof of concept targeting the WooCommerce provider. | |
* Version: 2016-03-21 | |
* Author: Barry Hughes | |
* | |
* Experiment in making attendee meta editable via the attendee screen. | |
* Well worth bearing in mind that: | |
* |
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 | |
/* Additional functions for changing strings in the events calendar and its plugins | |
* See https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/ for details | |
* on the provided functions by the TEC team | |
* 1. - function for changing quantity based spelling | |
* 2. - function for changing strings with an attached context | |
*/ | |
function tribe_custom_theme_numbered_text ( $translation, $single, $plural, $number, $domain ) { |
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 - Make code empty if it's 0 or Free | |
*/ | |
add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 ); | |
function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) { | |
if ( $cost == 0 || $cost == 'Free' ) { | |
$cost = ''; |
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 | |
/** | |
* Set default quantity of 1 for all tickets: | |
* - Event Tickets RSVP | |
* - Event Tickets Plus WooCommerce | |
* - Event Tickets Plus Easy Digital Downloads | |
* | |
* From https://gist.github.com/cliffordp/5b57df71be8b52f595817ddbf81acdab | |
* Same as this snippet but also make the quantity readonly: https://gist.github.com/cliffordp/80b33455779b74ec49f6ea3033cb47bf |
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_past_events_shortcode( $atts ) { | |
if ( ! class_exists( 'Tribe__Events__Pro__Shortcodes__Tribe_Events' ) ) return ''; | |
add_action( 'parse_query', 'tribe_past_events_shortcode_modify_query' ); | |
$shortcode = new Tribe__Events__Pro__Shortcodes__Tribe_Events( $atts ); | |
return $shortcode->output(); | |
} | |
function tribe_past_events_shortcode_modify_query( $query ) { | |
$query->set( 'tribe_is_past', true ); | |
remove_action( 'parse_query', 'tribe_past_events_shortcode_modify_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 | |
/** | |
* The Events Calendar + Event Tickets Plus + WooCommerce: Hide remaining | |
* quantity unless it is less than 4 (to create a sense of urgency). | |
* | |
* NOTE: We would need .each loop logic to work properly for more than just the | |
* first WooCommerce ticket if more than 1 WooCommerce ticket is available | |
* per event! | |
* | |
* If you want to ALWAYS hide (no sense of urgency logic), do not use this |
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 | |
/* | |
* For the following plugins: | |
* The Events Calendar, Event Tickets, Event Tickets Plus, WooCommerce | |
* | |
* The function hides the quantity form field from the cart page | |
* so users cannot change the product / ticket quantity there. | |
* It shows the number as plain text. | |
* Note: it only allows you to put 1 of all products in the cart!!! | |
* Useful if you are collecting attendee information with Event Tickets Plus |