Advertisement
BakerMan

Tony's front page code (amended)

Apr 9th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <h4 class="event-day">Today's Hours<br> <?php echo tribe_get_start_date( null, false ); ?></h4>
  2. <?php
  3. global $post;
  4. $current_date = date('j M Y');
  5. $end_date = date('j M Y');
  6. $get_posts = tribe_get_events(array('start_date'=>$current_date,'end_date'=>$end_date) );
  7.  
  8. foreach($get_posts as $post) {
  9.     setup_postdata($post);
  10.     if (tribe_get_start_date(null, false, 'Ymd') < date('Ymd')) continue; ?>
  11.     <b><?php the_title(); ?>:</b>
  12.     <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?>
  13.         <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'g:i a' ); ?>"/><?php echo tribe_get_start_date(null, false, 'g:i a'); ?>
  14.         <?php _e('-', 'tribe-events-calendar'); ?>
  15.         <meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'g:i a'); ?>"/> <?php echo tribe_get_end_date(null, false, 'g:i a'); ?>
  16.     <?php } else { ?>
  17.         <?php _e('CLOSED', 'tribe-events-calendar'); ?>
  18.     <?php } ?></br>
  19. <?php } //endforeach ?>
  20. <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement