SHARE
TWEET

Custom Events Calendar (shows next month)

eventsmanager Jan 12th, 2015 430 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top