php code to for mini calendar

Home Forums Calendar Products Events Calendar PRO php code to for mini calendar

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1175345
    Aaron
    Participant

    Hello,
    I would like to place the “Mini Calendar widget” within a php page. From what I can tell I need to use something like..
    <?php the_widget( ‘WP_Widget_Calendar’, $instance, $args ); ?>

    but i’m not sure specifically what your widget name would be for me to call it in? Any suggestions? Thank you!

    #1175399
    George
    Participant

    Hey Aaron,

    Thanks for reaching out.

    The name of the widget’s class to use there is Tribe__Events__Pro__Mini_Calendar_Widget.

    However, I would not recommend using the_widget() in this case.

    I would recommend using PHP like this instead:


    <?php

    echo do_shortcode( '[tribe_mini_calendar]' ); ?>

    The reason why I recommend this is because if you use this method, you still get to place the mini calendar widget output in a PHP page. However, you also can more easily use the shortcode options (which are covered in detail in this knowledgebase article).

    So, say you wanted to filter the calendar by category. You could do this:


    <?php

    echo do_shortcode( '[tribe_mini_calendar categories="concert"]' ); ?>

    ☝️ Whereas doing this by using the_widget() is a bit more complicated.

    Just some thoughts; if you want to use the_widget(), then again the class name to use is Tribe__Events__Pro__Mini_Calendar_Widget.

    Best of luck with your customizations!

    Sincerely,
    George

    #1187077
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘php code to for mini calendar’ is closed to new replies.