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('has_post_thumbnail') && has_post_thumbnail() ) { | |
echo '<a href="<?php echo tribe_get_custom_field('Label For Custom Field Link'); ?>">; | |
the_post_thumbnail(); | |
echo '</a>'; | |
} | |
?> |
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(has_term( 'zen-meditation', 'tribe_events_cat' )) { | |
echo '<span class="back"><a href="' . tribe_get_events_link() . 'category/zen-meditation">' . __('« Back to Zen Events', 'tribe-events-calendar') . '</a></span>'; | |
} elseif (has_term( 'celebrations', 'tribe_events_cat' )) { | |
echo '<span class="back"><a href="' . tribe_get_events_link() . 'category/celebrations">' . __('« Back to Celebrations', 'tribe-events-calendar') . '</a></span>'; | |
} else { | |
echo '<span class="back"><a href="' . tribe_get_events_link() . '">' . __('« Back to Events', 'tribe-events-calendar') . '</a></span>'; | |
} | |
?> |
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 (is_tax('tribe_events_cat', 9)) { | |
// Thus, if its a category, pull template 'list' | |
include(tribe_get_current_template('list')); | |
} else { | |
// If not a category, pull default set in options |
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 | |
// filter the number of years to go back | |
add_filter('tribe_years_to_go_back', 'my_tribe_years_to_go_back'); | |
function my_tribe_years_to_go_back() { | |
return 2; | |
} | |
// filter the number of years to go forwards | |
add_filter('tribe_years_to_go_forward', 'tribe_years_to_go_forward'); |
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 | |
/** | |
* this is lines 563-573 of /lib/tribe-view-helpers.class.php | |
*/ | |
private static function years( ) { | |
$year = ( int )date_i18n( 'Y' ); | |
// Back two years, forward 5 | |
$year_list = array( $year - 1, $year, $year + 1, $year + 2, $year + 3, $year + 4, $year + 5 ); |
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 | |
add_action('wp_head','tribe_dont_index_single_events'); | |
function tribe_dont_index_single_events() { | |
if ( is_singular() && get_post_type() == TribeEvents::POSTTYPE ) | |
echo '<meta name="robots" content="noindex">'; | |
} |
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 | |
add_filter('pre_get_posts', 'tribe_filter_days_on_single_day', 20); | |
function tribe_filter_days_on_single_day($query) { | |
if (tribe_is_day()) { | |
$query->set('nopaging', true); | |
} | |
return $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
/* | |
Courtesy of http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/ | |
*/ | |
-ms-word-break: break-all; | |
word-break: break-all; | |
// Non standard for webkit | |
word-break: break-word; |
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
// Define what post types to include in search | |
function include_in_search( $query ) { | |
if ( $query->is_search ) { | |
$query->set( 'post_type', array( 'post', 'page', 'feed', 'tribe_events' )); | |
} | |
return $query; | |
} | |
add_filter( 'the_search_query', 'include_in_search' ); |
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('wp_enqueue_scripts', 'example_enqueue_scripts'); | |
function example_enqueue_scripts() { | |
wp_dequeue_script('tribe-events-calendar-script'); | |
} | |
add_action('wp_footer', 'custom_events_script'); | |
function custom_events_script() { | |
wp_register_script('tribe-custom-calendar-script', get_bloginfo('stylesheet_directory') .'/events/events.js', array('jquery'), '1.0', true); // see http://codex.wordpress.org/Function_Reference/wp_enqueue_script for full details | |
wp_print_scripts('tribe-custom-calendar-script'); | |
} |
OlderNewer