Forum Replies Created
-
AuthorPosts
-
Dan
ParticipantI was able to figure this out. Here is the solution:
<?php $showMonths = 12; for ($i = 0; $i <= $showMonths; $i++) { $cat = 29; $date = date("Y-m-d", strtotime("+$i months", mktime(12, 12, 12, date ("n"), 1))); $args = 'filters={"tribe_events_cat":["'.$cat.'"]}&title=&count=&eventDate='.$date; the_widget('Tribe__Events__Pro__Mini_Calendar_Widget', $args); } ?>Dan
ParticipantJosh,
I don’t see any documentation anywhere showing how you can pass a date range to a shortcode??
Dan
ParticipantThis reply is private.
Dan
ParticipantJosh,
Using the cat id here still produces the same result.
https://www.dropbox.com/s/yuswov8wl6pa2zr/Screenshot%202016-05-15%2015.20.19.png?dl=0
Dan
ParticipantJosh,
Thanks for your help. I tried this before and it’s still not working. Here is the exact code:
<div style="width:40%; float:left;"> <h2>Beachfront Bight II Availability</h2> <?php $showMonths = 12; for ($i = 0; $i <= $showMonths; $i++) { $instance = array( 'title' => '', 'count' => 0, 'category'=>'beachfront-bight-2', 'eventDate' => date("Y-m-d", strtotime("+$i months", mktime(12, 12, 12, date ("n"), 1))) ); the_widget('Tribe__Events__Pro__Mini_Calendar_Widget', $instance); } ?> </div> <div style="width:40%; float:left;"> <h2>Beachfront Dog Trot Availability</h2> <?php $showMonths = 12; for ($i = 0; $i <= $showMonths; $i++) { $instance2 = array( 'title' => '', 'count' => 0, 'category'=>'beachfront-dogtrot', 'eventDate' => date("Y-m-d", strtotime("+$i months", mktime(12, 12, 12, date ("n"), 1))) ); the_widget('Tribe__Events__Pro__Mini_Calendar_Widget', $instance2); } ?> </div>Here are my event categories:
https://www.dropbox.com/s/2c3du4ou9dmqrxg/Screenshot%202016-05-12%2011.55.21.png?dl=0Here is the front-end result:
https://www.dropbox.com/s/jg49vyy9ylu7p0d/Screenshot%202016-05-12%2011.54.02.png?dl=0They’re both showing exactly the same result. The expected behavior is that only the calendar on the left should be showing the May 12 result and the one on the right June 20. Thoughts?
-
AuthorPosts
