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
add_action( 'pre_get_posts', 'tribe_post_alphabetical_ordering', 51 ); | |
function tribe_post_alphabetical_ordering( $query ) { | |
if( tribe_is_upcoming() ) { | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} |
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 | |
/* Tribe, prevent woo tickets email to be sent */ | |
add_filter( 'wootickets-tickets-email-enabled', '__return_false' ); |
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 | |
/** | |
* Event Submission Form Ticket Block | |
* Renders the ticket settings in the submission form. | |
* | |
* Override this template in your own theme by creating a file at | |
* [your-theme]/tribe-events/community-tickets/modules/tickets.php | |
* | |
* @version 4.1 | |
* @package Tribe__Events__Community__Tickets__Main |
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 | |
/** | |
* 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 | |
if ( ! function_exists( 'tribe_body_class_recurring_all' ) ) { | |
/** | |
* Adds a recurring all body class to the recurring all page | |
* | |
* @see body_class | |
*/ | |
function tribe_body_class_recurring_all( $classes, $class ) { |
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 change_rsvp_label() { ?> | |
<script> | |
jQuery(document).ready( function ( ){ | |
jQuery('input[value="Tribe__Tickets__RSVP"]').next().html('Free Tickets'); | |
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 | |
/** | |
* Remove the "Payment Options" link from the My List view of Community Events. | |
* | |
* This is useful to avoid confusion for end users of the site if PayPal, split | |
* payments etc are not in use. | |
*/ | |
function remove_cet_fe_payment_opts_link() { | |
if ( ! class_exists( 'Tribe__Events__Community__Tickets__Main' ) ) return; | |
$router_object = Tribe__Events__Community__Tickets__Main::instance()->routes['payment-options']; |
OlderNewer