Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- CALENDAR START -->
- <?php
- $args = array(
- 'post_type' => array(TribeEvents::POSTTYPE),
- 'posts_per_page' => 10,
- 'post_status' => 'publish',
- 'meta_query' => array(
- 'relation' => 'OR',
- array(
- 'key' => '_EventStartDate',
- 'value' => array(
- date('Y-m-d H:i:s', strtotime('now')),
- date('Y-m-d H:i:s', strtotime('+16 weeks'))),
- 'compare' => 'BETWEEN',
- 'type' => 'DATETIME'
- ),
- array(
- 'key' => '_EventEndDate',
- 'value' => array(
- date('Y-m-d H:i:s', strtotime('now')),
- date('Y-m-d H:i:s', strtotime('+16 weeks'))),
- 'compare' => 'BETWEEN',
- 'type' => 'DATETIME'
- )
- ),
- 'tax_query' => array(
- array(
- 'taxonomy' => TribeEvents::TAXONOMY,
- 'field' => 'slug',
- 'terms' => array('management-development'),
- 'operator' => 'IN'
- )
- )
- );
- $get_posts = null;
- $get_posts = new WP_Query();
- $get_posts->query($args);
- if($get_posts->have_posts()) : while($get_posts->have_posts()) : $get_posts->the_post(); ?>
- <div class="entry">
- <!--<div class="mgi-event-title"><a href="<php the_permalink(); ?>"><php the_title(); ?></a></div> -->
- <div class="mgi-event-list">
- <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?>
- <?php echo tribe_get_start_date(); ?> - <?php echo tribe_get_end_date(); ?></div>
- <?php } else { ?>
- <?php echo tribe_get_start_date(); ?> <a href="<?php the_permalink(); ?>"> > View Details</a></div>
- <?php } ?>
- </div>
- <?php
- endwhile;
- endif;
- wp_reset_query();
- ?>
- <!-- CALENDAR END -->
Advertisement
Add Comment
Please, Sign In to add comment