PHP Code to include mini calendar in custom theme side bar?

Home Forums Calendar Products Events Calendar PRO PHP Code to include mini calendar in custom theme side bar?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #950933
    Jennifer
    Participant

    I 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?

    #950969
    Brian
    Keymaster

    Hi,

    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

    #951139
    Jennifer
    Participant

    Thank you for the help Brian…that worked great.

    #951200
    Jennifer
    Participant

    I 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.

    #951208
    Jennifer
    Participant

    I 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:

    http://cal-abota.org/calendar-widget-test/

    #951262
    Brian
    Keymaster

    Ok 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 4

    Looks like some issue with the Gallery Plugin you have. Fixing that should fix the mini calendar.

    Let me know.

    Thanks

    #967678
    Brian
    Keymaster

    I 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘PHP Code to include mini calendar in custom theme side bar?’ is closed to new replies.