eventsmanager

Custom Events Calendar (shows next month)

Jan 12th, 2015
497
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function custom_shortcode(){
  2.  
  3. $d = new DateTime('NOW');
  4. $d->modify( 'next month' );
  5. $month = $d->format( 'm' );
  6.  
  7. $y = new DateTime('NOW');
  8. $year = $d->format( 'yyyy' );
  9.  
  10. echo do_shortcode('[events_calendar year="'.$year.'" month="'.$month.'" long_events=1 full=1]');
  11. }
  12. add_shortcode( 'custom_calendar', 'custom_shortcode' );
RAW Paste Data