Home › Forums › Calendar Products › Events Calendar PRO › PHP Code to include mini calendar in custom theme side bar?
- This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by
Brian.
-
AuthorPosts
-
March 25, 2015 at 4:26 pm #950933
Jennifer
ParticipantI recently inherited a customized WordPress site that uses a custom theme and does not utilize the vanilla WordPress side-bar. For this reason, any widgets added to “Side Bar 1″ do not work. I would like to include the mini calendar widget in the custom side-bar.
The site utilized a different calendar plugin that I disabled, and following is the code it used to include the widget for the old calendar plugin. I am looking for the equivalent to include the pro mini calendar in its place:
<?php if(!is_front_page()) : ?>
<?php if (function_exists(‘calendar’)) : ?>
<div id=”calendar” class=”calendar side-calendar”>
<?php echo calendar(grabEventCatId()); ?>
</div>
<?php endif; ?>
<?php endif; ?>I of course first attempted to use function such as tribe_calendar_mini_grid() with no luck. Any ideas how I can get this to work?
March 25, 2015 at 5:05 pm #950969Brian
MemberHi,
I think I can help out here.
You should be able to use the WordPress function do_shortcode() on the mini calendar shortcode to get this to work.
Try adding this where you would like it to display:
<?php echo do_shortcode( '[tribe_mini_calendar]'); ?>You can find more about the shortcode options here:
https://theeventscalendar.com/knowledgebase/inserting-the-calendar-into-a-page-or-post/
Let me know if that helps.
Thanks
March 26, 2015 at 8:26 am #951139Jennifer
ParticipantThank you for the help Brian…that worked great.
March 26, 2015 at 10:29 am #951200Jennifer
ParticipantI may have spoke too soon…none of the links in the mini calendar widget work. Looking through documentation now to try and figure out why.
March 26, 2015 at 10:43 am #951208Jennifer
ParticipantI also notice that when I use the basic shortcode in a page, the same issues are there:
[tribe_mini_calendar]
None of the links, other than the one upcoming event that shows up under the mini calendar, are working:
March 26, 2015 at 12:04 pm #951262Brian
MemberOk glad it is moving forward.
As for the errors I am seeing this in the console:
TypeError: $(…).colorbox is not a function Line 86
TypeError: b.browser is undefined
http://cal-abota.org/wp-content/plugins/jquery-lightbox-for-native-galleries/colorbox/jquery.colorbox-min.js?ver=1.3.14
Line 4Looks like some issue with the Gallery Plugin you have. Fixing that should fix the mini calendar.
Let me know.
Thanks
June 7, 2015 at 11:10 am #967678Brian
MemberI am going to close this topic as we typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.
Thanks
-
AuthorPosts
- The topic ‘PHP Code to include mini calendar in custom theme side bar?’ is closed to new replies.
