Advertisement
michaelalbee

Untitled

Apr 4th, 2012
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <?php
  2. global $ai1ec_calendar_helper, $ai1ec_events_helper;
  3. $bits = $ai1ec_events_helper->gmgetdate( $ai1ec_events_helper->gmt_to_local( time() ) );
  4. $start_time = $ai1ec_events_helper->local_to_gmt( $now );
  5. $end_time = $ai1ec_events_helper->local_to_gmt( $end_time );
  6. $now = $ai1ec_events_helper->local_to_gmt( time('D, M d Y H:i:s') );
  7.  
  8. // The New Events Query
  9. $args = array(
  10. 'posts_per_page' => 1,
  11. 'paged' => get_query_var('paged'),
  12. 'post_type' => 'ai1ec_event',
  13. 'cat_ID' => '40',
  14. 'orderby' => 'date',
  15. 'order' => 'ASC',
  16. 'post_status' => 'publish',
  17.  
  18. );
  19.  
  20. $events_added = new WP_Query( $args );
  21. // The Loop
  22. while ( $events_added->have_posts() ) : $events_added->the_post();
  23.  
  24. $event = Ai1ec_Calendar_Helper::get_events_between($now, $end_time, $filter, $spanning = false);
  25.  
  26. ?>
  27. <li>
  28. <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('home-features'); ?></a>
  29. <?php the_excerpt(); ?>
  30. <h2>
  31.  
  32. <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> </h2>
  33. </li>
  34. <?php
  35.  
  36. endwhile;
  37.  
  38. // Reset Post Data
  39. wp_reset_postdata();
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement