Mini Cal – Month of Next Event – the_widget()

Home Forums Calendar Products Events Calendar PRO Mini Cal – Month of Next Event – the_widget()

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #681887
    Graeme
    Participant

    Hi Guys,

    http://midlothiansciencefestival.com

    I have used your instructions (https://tri.be/fast-forward-to-the-next-upcoming-event-in-calendar-widget/) to change the mini cal widget to load to the month of the next upcoming event, which works great.

    However, I have placed the mini cal widget on a page using the_widget() (it’s on the home page, but only displays when viewed on mobile, otherwise hidden using @media css query – so just drag the window narrow to see on the site). The mini cal itself works fine, however the loading to the month of the next upcoming event does not work so well – it just displays current month.

    Here is the the_widget() code I used to place it on my page template:

    $instance = array(

    ‘title’ => ‘Find Events’,
    ‘count’ => 0,
    );

    the_widget(‘TribeEventsMiniCalendarWidget’, $instance, $args );

    Any ideas? I feel I’m close, but just missing something.

    Many Thanks,

    Graeme.

    #681987
    ocama
    Participant

    I’m having similer issue as well. I added the theme-functions.php file to my wordpress editor and it works. However, it’s not displaying the upcoming events in the list format. However, if I go back a month by clicking on the left arrow and go back to September, I can see the list of event. However, when I first load the page, it doesn’t work.

    http://ocama.staging.wpengine.com/our-chapter/

    #681995
    Graeme
    Participant

    Hi ocama – I think that sounds like a different issue, perhaps you should open a forum discussion for that if not already? Looks to be an ajax issue to me (sure I read another thread here today with a very similar issue)

    #684400
    Brook
    Participant

    Howdy Graeme

    That is a tough one! Basically the function from that tutorial Tribe_Advance_Minical::advance_minical() adds an action to tribe_events_before_view. Only, that action is not called by the function the_widget(). This can be fixed by directly by using a different action that is always called. However, you will also have to have some way to detect if it is the proper widget.

    You could do this by instead adding Tribe_Advance_Minical::amend_list_query() directly to parse_query. However, that will run on all parsed queries. So you would want to make sure to add that action right before calling the_widget in your code as it will remove itself after it has run.

    You are the first person I have seen try to call our widget that way. You might encounter other side effects. I just tested it and frankly was impressed that it was functioning perfectly, given that it is a non standard way of calling the widget. I hope that works well for you! Please let me know if you have any more questions, or if that helped you solve it. Cheers!
    – Brook

    #684404
    Brook
    Participant

    Ooops! Ocama, like Graeme said it would be best for you to open a new topic. That way we can help you with your issue which sounds distinct from this one. Cheers to you as well!

    – Brook

    #684474
    Graeme
    Participant

    Thanks Brook. I’ll give that a try tomorrow, looks encouraging though.

    #688729
    Brook
    Participant

    You are welcome! Let me know how it goes.

    – Brook

    #809186
    Brook
    Participant

    Since this topic has gone for a spell without a response I am going to archive it. If you do need anything else please feel free to open a new topic. Cheers!

    – Brook

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Mini Cal – Month of Next Event – the_widget()’ is closed to new replies.