Guest User

Event Query \

a guest
Sep 14th, 2012
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1.     $today = date('Y-m-d');
  2.     $lastDayOfMonth = date('Y-m-d', strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
  3.  
  4.     $args = array(
  5.         'start_date' => $today,
  6.         'end_date'=> $lastDayOfMonth,
  7.         'eventDisplay' => 'all'
  8.     );
  9.  
  10.     foreach (tribe_get_events($args) as $event)
  11.         echo $event->post_title.' ';
Advertisement
Add Comment
Please, Sign In to add comment