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 ( 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 (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 | |
/* | |
Plugin Name: Logged in only events calendar | |
Plugin URI: http://tri.be/support/forums/topic/calendar-view/#post-14059 | |
Description: Prevents non-loggedin users from seing The Events Calendar. Requires The Events Calendar by Modern Tribe Inc | |
Version: 0.1 | |
Author: Joachim Kudish | |
Author URI: http://jkudish.com/ | |
License: GPLv2 |
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
<?php | |
/** | |
* This is an example of a query which gets a single random event from the | |
* 'featured' event category amongsts evetns from The Events Calendar | |
* | |
* @see http://tri.be/support/forums/topic/random-featured-event-custom-widget/ | |
*/ | |
get_header(); |
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; |
OlderNewer