Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    at the moment you can try something like [events_calendar month=”2″ year=”2015″]

    Thread Starter greigcooke

    (@greigcooke)

    Thanks,

    I created the following code if it is of use to anyone who browses here in the future.

    It keeps the calendar on the month of the show being displayed or month of search

    $event_start is set as – $event_start = $EM_Event->event_start_date; on the event-single.php and is set as a global variable

    <?php
    	$urlholder = $_SERVER['REQUEST_URI']; // get url
            global $event_start;
            settype($event_start, "string")
    
      			   if (!empty($event_start)) {  
    
      	   			   $getmonth = substr($event_start, -5, 2); //gets month from url
      	   			   			if (substr($getmonth, 0, 1) == '0') {
      	   			   				$getmonth = substr($getmonth, 1);
      	   			  		  		}
      			   } else {
    
         			   if (preg_match('#[0-9]#',$urlholder)){ //check if contains number
    
         			   $getmonth = substr($urlholder, -6, 2); //gets month from url
    
         			   			if (substr($getmonth, 0, 1) == '0') {
         			   				$getmonth = substr($getmonth, 1);
         			  		  		}
      			   } else { $getmonth = date('n');  }
      		   } //echo $getmonth; ?>
    
    		  <?php echo EM_Calendar::output(array('full'=>0, 'long_events'=>1, 'month'=> $getmonth, 'year'=>2015)); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mini Calendar’ is closed to new replies.