This file contains hidden or 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 hidden or 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 | |
| /** | |
| * Renders the attendee list for an event | |
| * | |
| * @version 4.1 | |
| * | |
| */ | |
| ?> | |
| <div class='tribe-attendees-list-container'> | |
| <h2 class="tribe-attendees-list-title"><?php esc_html_e( 'Who\'s Attending', 'event-tickets-plus' ) ?></h2> |
This file contains hidden or 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 hidden or 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 | |
| // Replaces Line 29 | |
| // Replace /events with the calendar slug, if different in the settings | |
| ?> | |
| <span id="<?php echo esc_attr( $mini_cal_widget_id ) ?>"><a href="/events"><?php tribe_events_the_mini_calendar_title() ?></a></span> |
This file contains hidden or 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 | |
| // When exporting Events, only grab the posts that match the post_modified date | |
| function tribe_snippet_export_query( $query ) { | |
| // You can adjust the strtotime() to point to the day you want to import from | |
| $post_modified = date( 'Y-m-d H:i:s', strtotime( '-5 days' ) ); | |
| $query .= " AND post_modified >= '{$post_modified}' "; | |
| remove_filter( 'query', 'tribe_snippet_export_query' ); |
This file contains hidden or 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_filter('tribe_get_events_title', 'my_get_events_title'); | |
| function my_get_events_title($title) { | |
| if( tribe_is_photo() && is_archive() ) { | |
| return ''; | |
| } else { | |
| return $title; | |
| } | |
| } |
This file contains hidden or 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 Yoast from changing Event Title Tags for Event Views (Month, List, Etc,) | |
| add_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 ); | |
| function tribe_remove_wpseo_title_rewrite() { | |
| if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) { | |
| if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) { | |
| $wpseo_front = WPSEO_Frontend::get_instance(); | |
| remove_filter( 'wp_title', array( $wpseo_front, 'title' ), 15 ); | |
| remove_filter( 'pre_get_document_title', array( $wpseo_front, 'title' ), 15 ); | |
| } |
This file contains hidden or 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: The Events Calendar Remove Events Archive from Yoast Page Title | |
| Plugin URI: https://gist.github.com/geoffgraham/041c048aca979de714273314ae039ce7 | |
| Description: The Events Calendar - Yoast SEO - Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,) | |
| */ | |
| add_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 ); | |
| function tribe_remove_wpseo_title_rewrite() { | |
| if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) { | |
| if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) { |
This file contains hidden or 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
| /* | |
| * The Events Calendar WooCommerce Tickets - Change You'll receive your tickets in another email. | |
| * @ Version 4.3.1 | |
| */ | |
| add_filter('wootickets_email_message', 'woo_tickets_filter_completed_order', 10 ); | |
| function woo_tickets_filter_completed_order($text) { | |
| $text = "Your custom text"; | |
| return $text; | |
| } |
This file contains hidden or 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 | |
| /** | |
| * Single Event Template | |
| * A single event. This displays the event title, description, meta, and | |
| * optionally, the Google map for the event. | |
| * | |
| * Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php | |
| * | |
| * @package TribeEventsCalendar | |
| * |