Guest User

Tribe Events Issue

a guest
Jul 9th, 2013
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <?php
  2.  
  3.     $events = tribe_get_events(array(
  4.         'eventDisplay'=>'upcoming',
  5.         'posts_per_page'=>1
  6.     ));
  7.  
  8.     <?php foreach($events as $post) { setup_postdata($post); ?>
  9.             <div class="news tall border-box">
  10.                 <h1 class="dark-blue">Upcoming Event</h1>
  11.                 <div class="meta proxima">
  12.                     <div class="date"><?php echo tribe_get_start_date($post->ID, false, 'l, F j, Y'); ?></div>
  13.                     <div class="author"><?php the_author(); ?></div>
  14.                 </div>
  15.                 <?php if (has_post_thumbnail()) { ?>
  16.                     <?php the_post_thumbnail('thumbnail'); ?>
  17.                 <?php } else { ?>
  18.                     <img height="99" width="100" src="<?php echo get_template_directory_uri() . '/img/blog-img-placeholder-thumb.jpg'; ?>">
  19.                 <?php } ?>
  20.                 <div class="recent-post inline-block freight">
  21.                     <h2 class="proxima dark-blue"><?php the_title(); ?></h2>
  22.                     <p><?php echo new_excerpt_more(substr(get_the_excerpt(),0,90))."..."; ?></p>
  23.                 </div>
  24.                 <div class="links proxima">
  25.                     <div class="post"><a href="<?php echo get_permalink($query->ID); ?>">More Info &rsaquo;</a></div>
  26.                     <div class="bullet"></div>
  27.                     <div class="all"><a href="<?php echo home_url(); ?>/news-events/event-calendar">Calendar &rsaquo;</a></div>
  28.                 </div>
  29.             </div>
  30.             <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment