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
<ul> | |
<?php | |
global $post; | |
$args = array( | |
'post_status'=>'publish', | |
'post_type'=>'tribe_venue', | |
'posts_per_page'=>-1 | |
); | |
$get_posts = null; |
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
/*-----------------------------------------------------------------------------------*/ | |
/* Adds new body classes | |
/*-----------------------------------------------------------------------------------*/ | |
add_filter('body_class', 'add_browser_classes'); | |
function add_browser_classes($classes){ | |
if(is_singular()) { | |
global $post; | |
$classes[] = $post->post_name; | |
} |
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_filter('tribe_get_venue_link', 'my_custom_get_venue_link'); | |
function my_custom_get_venue_link($postId = null, $display = true) { | |
$url = esc_url( get_permalink( tribe_get_venue_id( $postId ) ) ); | |
if( $display && $url != '' ) { | |
$venue_name = tribe_get_venue($postId); | |
$link = '<a href="'.$url.'" title="'.$venue_name.'">'.$venue_name.'</a>'; | |
} else { | |
$link = $url; | |
} | |
if ( $display ) { |
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_filter('tribe_get_organizer_link', 'my_custom_organizer_link'); | |
function my_custom_organizer_link( $postId = null, $full_link = true, $display = false ) { | |
$postId = TribeEvents::postIdHelper( $postId ); | |
$url = esc_url(tribe_get_event_meta( tribe_get_organizer_id( $postId ), '_OrganizerWebsite', true )); | |
if( $full_link && $url != '' ) { | |
$organizer_name = tribe_get_organizer($postId); | |
$link = '<a href="'.$url.'" title="'.$organizer_name.'">'.$organizer_name.'</a>'; | |
} else { | |
$link = $url; | |
} |
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_filter('woo_title', 'events_page_title'); | |
function events_page_title( $title ) { | |
if ( is_single() && !tribe_is_showing_all() ) { // single event | |
$title = get_the_title(); | |
} elseif ( tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || (is_single() && tribe_is_showing_all()) ) { // list view | |
$title = "Upcoming Events List"; | |
} else { // grid view | |
$title = "Calendar of 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 | |
/** | |
* Exclude a specific category from Events Grid View | |
* | |
* @author jkudish | |
* @uses pre_get_posts filter | |
* @param object $query the query object | |
* @return object $query the filtered object | |
*/ |
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
//set mini cal days as links | |
if( function_exists('tribe_get_linked_day') ) { | |
$date = tribe_get_start_date( '', false, 'Y-m-'.$day.'' ); | |
$return .= ( count($monthView[$day]) ) ? "<a href='" . tribe_get_day_link($date) . "' class='tribe-events-mini-has-event'>$day</a>" : $day; | |
} else { | |
$return .= ( count($monthView[$day]) ) ? "<a class='tribe-events-mini-has-event'>$day</a>" : $day; | |
} |
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 $fields = tribe_get_custom_fields( get_the_ID() ); ?> | |
<?php unset($fields['Name']); ?> | |
<?php foreach ($fields as $label => $value) { | |
echo $label; | |
echo $value; | |
} ?> |