Use the_widget for Event Tribe Widgets with arguments

Home Forums Calendar Products Events Calendar PRO Use the_widget for Event Tribe Widgets with arguments

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #42934
    Denise Crosbie
    Participant

    I am reading post: https://theeventscalendar.com/support/forums/topic/upcoming-events-in-page-template/#post-30779

    I see I can call the_widget function for the following Tribe widgets:
    TribeEventsListWidget()
    TribeEventsAdvancedListWidget()
    TribeEventsCalendarWidget()
    TribeEventsFeatureWidget()

    But this topic doesn’t help me discover the arguments that I can use. For example when I use the Advanced List widget I can select an event category. but, I don’t know what argument to pass in to the_widget function to pass in the event category?

    #42937
    Denise Crosbie
    Participant

    Digging through the code I see that I can use “category”, I use it like this:
    the_widget(‘TribeEventsAdvancedListWidget’,’category=11′);
    Which works.

    Is there a doc that specifies these settings for future reference?

    #42938
    Barry
    Member

    Keys you might pass in as part of the instance array could include:

    • title
    • limit
    • no_upcoming_events
    • start
    • end
    • venue
    • country
    • address
    • city
    • region
    • zip
    • phone
    • cost
    • category

    You don’t need to pass in all of them of course, just those where you need to change the value to something non-default.

    #42943
    Denise Crosbie
    Participant

    Are those valid just for TribeEventsAdvancedListWidget or for TribeEventsCalendarWidget as well? I am also looking to filter TribeEventsCalendarWidget by category.

    #42945
    Barry
    Member

    TribeEventsCalendarWidget is slightly different and I believe the only argument passed in is title … so to restrict it to a specific category you might instead override table-mini.php and make some changes to the tribe_get_events() call in that template.

    Some good resources:

    Hope that helps 🙂

    #43199
    Denise Crosbie
    Participant

    Thanks for the list on TribeEventsAdvancedListWidget I am using the category filter and it works great. For the TribeEventsCalendarWidget I could custom code, but I’m tight for time so I just have the Advanced List Widget link over to the filtered calendar by category. Good enough.

    #43218
    Barry
    Member

    Great – the main thing is you’ve got a solution in place 🙂

    Do let us know if there you need any other support on this one though, otherwise I will close the thread a few days from now.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Use the_widget for Event Tribe Widgets with arguments’ is closed to new replies.