Skip to content

Instantly share code, notes, and snippets.

<?php
tribe_get_template_part( 'wootickets/tickets', null, array(
'tickets' => Tribe__Events__Tickets__Tickets::get_all_event_tickets( get_the_ID() )
) );
?>
<?php
function wootix_no_hijack() {
if ( ! class_exists( 'Tribe__Events__Tickets__Woo__Main' ) ) return;
$woo_tickets = Tribe__Events__Tickets__Woo__Main::get_instance();
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 );
}
add_action( 'init', 'wootix_no_hijack' );
@theeventscalendar
theeventscalendar / tribe-events-title-month.php
Created August 14, 2015 23:07 — forked from anonymous/tribe-events-title-month.php
Change the title for the Month View page
<?php
/**
* Defines alternative titles for month view.
*
* @param string $title
* @return string
*/
function filter_events_title_month( $title ) {
if ( tribe_is_month() ) {
$title = 'Month view page';
@theeventscalendar
theeventscalendar / tribe-events-title-tag.php
Created August 14, 2015 23:06 — forked from anonymous/tribe-events-title-tag.php
Change the title tags on various event pages
<?php
/**
* Defines alternative titles for various event views.
*
* @param string $title
* @return string
*/
function filter_events_title( $title ) {
// Single events
if ( tribe_is_event() && is_single() ) {
@theeventscalendar
theeventscalendar / add-prev-next-links.php
Last active August 29, 2015 14:27 — forked from BeardedGinger/prevnext.php
Adds Previous/Next Month links to Month View even when no future/past events exist
@theeventscalendar
theeventscalendar / past-event-reverse-order.php
Created August 10, 2015 22:55 — forked from elimn/functions.php
Change past event views to reverse chronological order
<?php
// Changes past event views to reverse chronological order
function tribe_past_reverse_chronological ($post_object) {
$past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'past') ? true : false;
if(tribe_is_past() || $past_ajax) {
$post_object = array_reverse($post_object);
}
@theeventscalendar
theeventscalendar / link-directly-to-website-url.php
Last active January 15, 2019 19:55 — forked from elimn/tribe_set_link_website.php
Change event or venue links in The Events Calendar to the relevant website URL
<?php
$count = 0;
echo '<ul>';
foreach ( $tickets as $ticket ) {
global $product;
$count++;
if ( class_exists( 'WC_Product_Simple' ) ) $product = new WC_Product_Simple( $ticket->ID );
else $product = new WC_Product( $ticket->ID );
@theeventscalendar
theeventscalendar / show-phone-number-attendees-list.php
Last active August 29, 2015 14:24
Show the purchaser's phone number in the Tickets attendee list.
if ( function_exists( 'tribe_is_event') ) {
/**
* Adds the phone number to the "Purchaser Email" column.
* @link http://theeventscalendar.com/support/forums/topic/add-attendee-telephone-number-to-attendee-list/
*/
function tribe_953653_add_phone_to_attendee_list( $value, $item, $column ) {
// Change this column name to move the phone number to a different column.
if ( 'purchaser_email' != $column ) {
return $value;
@theeventscalendar
theeventscalendar / org-email-mailto.php
Created July 7, 2015 21:55 — forked from barryhughes/live-click-org-email.php
Makes the Organizer email a mailto link on single event pages
/**
* Convert organizer emails into live "mailto:" links that users can click on.
*
* @param $email
* @return string
*/
function organizer_live_email_link( $email ) {
if ( ! is_email( $email ) || ! is_singular( Tribe__Events__Main::POSTTYPE ) ) return $email;
return '<a href="mailto:' . esc_attr( $email ) . '">' . esc_html( $email ) . '</a>';
}