Custom Calendar Mini Widget

Home Forums Calendar Products Events Calendar PRO Custom Calendar Mini Widget

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #170207
    livog
    Participant

    I am trying to make a custom template to the calendar. On the single Event page where I see all event details/ the actual event, I am making something that look like the mini calendar widget, the difference is that it displays the month of the current event you are currently watching, and when you click on any event in the list under it, it will ajax load the content. This is where I am stuck, how do I make a function to output the ajax in the_content/ targeted div, and how to I print the Mini Calendar Widget with currently view same month as the current event. I have tried tribe_is_event() but I never get it to return anything.

    Any help is appreciated.
    Thanks in advance!

    #171957
    Barry
    Member

    Hi!

    That sounds like a great idea – it’s a fairly bespoke customization though so the amount of help we can offer is limited – but here is the sort of approach I’d explore if I were personally taking this on.

    First of all, review this tutorial which explains how you can set the calendar widget to any month you like using syntax like:

    new Tribe_Advance_Minical('2014-12'); // December 2014

    Then create a new wrapper function (which you might define this in your theme’s functions.php file). Within that function, you could:

    • Determine the month/year of the current event by using tribe_get_start_date()
    • Set up a Tribe_Advance_Minical object as described above, using the event date (in yyyy-mm format)
    • Use WordPress’s the_widget() function to actually pull in the widget itself

    You could probably wrap this up quite nicely within a single function then just drop your custom function into a template override for single-event.php (please see our Themer’s Guide for an outline of this process if you haven’t already done so).

    Again, we can’t really offer much more for a customization of this nature but I hope that at least gives you a few ideas.

    Good luck 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Custom Calendar Mini Widget’ is closed to new replies.