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; | |
$events_query = tribe_get_events( | |
array( | |
'eventDisplay'=>'upcoming', | |
'posts_per_page'=>10, | |
'tax_query'=> array( | |
array( |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
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 (tribe_get_start_date() !== tribe_get_end_date() ) { ?> | |
<dt class="event-label event-label-start"><?php _e('Starts:', 'tribe-events-calendar') ?></dt> | |
<dd class="event-meta event-meta-start"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date( null, false, 'F j, Y' ); ?></dd> | |
<dt class="event-label event-label-from"><?php _e('From:', 'tribe-events-calendar') ?></dt> | |
<dd class="event-meta event-meta-from"><meta itemprop="fromTime" content="<?php echo tribe_get_start_date( null, false, 'g:ia' ); ?>"/><?php echo tribe_get_start_date( null, false, 'g:ia' ); ?> to <?php echo tribe_get_end_date( null, false, 'g:ia'); ?></dd> | |
<?php } else { ?> | |
<dt class="event-label event-label-date"><?php _e('Date:', 'tribe-events-calendar') ?></dt> | |
<dd class="event-meta event-meta-date"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date(); ?></d |
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( 'pre_get_posts', 'exclude_events_category' ); | |
function exclude_events_category( $query ) { | |
if ( tribe_is_event() && !tribe_is_day() && !is_single() && !is_tax() && !tribe_is_month() ) { | |
$query->set( 'tax_query', array( | |
array( | |
'taxonomy' => TribeEvents::TAXONOMY, | |
'field' => 'slug', | |
'terms' => array('zoo'), |
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 | |
$args = array( | |
'post_status'=>'publish', | |
'post_type'=>array(TribeEvents::POSTTYPE), | |
'posts_per_page'=>10, | |
//order by startdate from newest to oldest | |
'meta_key'=>'_EventStartDate', | |
'orderby'=>'_EventStartDate', | |
'order'=>'DESC', |
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 | |
$args = array( | |
'post_status'=>'publish', | |
'post_type'=>array(TribeEvents::POSTTYPE), | |
'posts_per_page'=>100, | |
'tax_query' => array( | |
array( | |
'taxonomy' => TribeEvents::TAXONOMY, | |
'field' => 'slug', |
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 | |
global $post; | |
$get_posts = tribe_get_events(array('posts_per_page'=>-1, 'eventDisplay'=>'past') ); | |
foreach($get_posts as $post) { setup_postdata($post); | |
?> | |
<?php if ( has_post_thumbnail() ) { ?> | |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Modify Event List Order in Admin | |
/*-----------------------------------------------------------------------------------*/ | |
function set_custom_post_types_admin_order($wp_query) { | |
if (is_admin()) { | |
// Get the post type from the query | |
$post_type = $wp_query->query['post_type']; |
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
<ul> | |
<?php | |
$args = array( | |
'post_status'=>'publish', | |
'post_type'=>'tribe_organizer', | |
'posts_per_page'=>-1 | |
); | |
$get_posts = null; | |
$get_posts = new WP_Query(); |
NewerOlder