Home › Forums › Calendar Products › Events Calendar PRO › Have 12 months of mini calendars
- This topic has 5 replies, 2 voices, and was last updated 11 years, 5 months ago by
Josh.
-
AuthorPosts
-
November 19, 2014 at 5:22 am #890508
Jon Nixon
ParticipantI’m trying to figure out a way to have 12 months of mini calendars display on my calendar page. It seems the only way to display the mini calendar is by adding a widget (which I’ve done). However, I can’t figure out a way to pass a month to tribe_show_month inside mini-calendar-widget.php. Any pointers?
November 19, 2014 at 2:28 pm #891100Josh
ParticipantHello nixonmedia,
Thanks for reaching out to us!
I’m not sure there is an easy way to accomplish what you’re trying to with multiple instances of the events calendar widget. You can set the default month for the widget using the following tutorial. That tutorial shows how to fast forward, however you can pass the month directly to the new instance of the class. So, adding “new Tribe_Advance_Minical(‘2014-12’);” will force the calendar widget to start in December.
I’m sorry I wasn’t able to give you a direct response however I hope this was able to point you in the right direction.
– Josh
November 20, 2014 at 5:23 am #891899Jon Nixon
ParticipantThanks for the reply Josh. I’ve seen that post on how to change the date on a single calendar. However, I’m looking to be able to do this to a series of calendars. Before I venture down that path more, do you know if it is possible to have multiple calendars on a single page?
November 20, 2014 at 11:28 am #892400Jon Nixon
ParticipantAlso, I think it’s worth noting that I’m attempting the same method of
the_widget( ‘TribeEventsMiniCalendarWidget’,$instance, $args );
referenced here:
the_widget( ‘TribeEventsMiniCalendarWidget’,$instance, $args );
I didn’t see a way, however, is there a parameter within the $instance that accepts a month?November 20, 2014 at 12:16 pm #892492Jon Nixon
ParticipantSo I figured out that I could use eventDate to in the $instance and create full year of calendars using the following:
<?php
for ($i = 0; $i <= 12; $i++) {
$instance = array(
‘title’ => ”,
‘count’ => 0,
‘eventDate’ => date(“Y-m”, strtotime(“+{$i} months”))
);the_widget( ‘TribeEventsMiniCalendarWidget’, $instance);
}
?>November 24, 2014 at 10:14 am #897231Josh
ParticipantHello nixonmedia,
Thanks for following up with us!
I’m glad you were able to find a solution! I’ll go ahead and close this ticket. If you have any further questions, please don’t hesitate to open a new one.
Thanks!
-
AuthorPosts
- The topic ‘Have 12 months of mini calendars’ is closed to new replies.
