embed minical with php

Home Forums Calendar Products Events Calendar PRO embed minical with php

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1106606
    David
    Participant

    I’d like to embed minical into the theme with php, I need the same options as on the widget, so I can say how many events to display beneath the calendar.

    Is this possible?

    #1106664
    David
    Participant

    this doesn’t work…

    <?php
       if(function_exists('the_widget')) { // If the_widget is supported
    		the_widget( 'tribe_mini_calendar' );
      }
    ?>
    #1106675
    George
    Participant

    Hey @David,

    While we cannot offer help with code customizing and such, I think a helpful bit of advice here would be to use the do_shortcode() function in WordPress instead.

    You can learn more about that function here → https://developer.wordpress.org/reference/functions/do_shortcode/

    This would let you use all shortcode arguments/options as normal, and so you could use something like this instead of what you posted:


    if ( function_exists( 'do_shortcode' ) ) {
    echo do_shortcode( '[tribe_mini_calendar category="party"]' );
    }

    You’ll have to take the reins from here on further tweaking and developing, but I hope this helps! And be sure to check out this guide to our widget shortcodes if you have questions about those → https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/

    — George

    #1106687
    David
    Participant

    Thanks (is this customisation?).

    It’s not the do_shortcode() that fixed it, it’s adding the category which I’ve set to All.

    Thanks again.
    d

    #1106857
    George
    Participant

    Glad to help—best of luck with your site!
    George

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘embed minical with php’ is closed to new replies.