Listing multiple events in list widget with only one show

Home Forums Calendar Products Events Calendar PRO Listing multiple events in list widget with only one show

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #652414
    wallyglenn
    Participant

    I would like to list shows in the events list widget but only have one show in a series listed. The problem is that if a show is a reoccurring event, I will get multiple shows, which is a feature I want in other events list widgets.

    Is there a way to turn off Recurring event instances in just one widget list?

    I thought about creating a new category, as an example, “Featured” and filer

    #652549
    Galen
    Participant

    Under Settings > General Check the Recurring Event Instances Box Show and only the first instance of each recurring event (only affects list-style views

    #652805
    wallyglenn
    Participant

    Forgive me if I was not clear.

    On the front page of my web site, I have an events list widget that lists all the upcoming events. I would like to create a second list where I only wish to list an event once.

    I would like both lists to have different functionality. One that lists the next 10 upcoming events, including events that happen over several days. The other list will show featured events, but only one instance.

    I am looking for a way to turn off Recurring event instances for a featured event widget list.

    #658583
    Barry
    Member

    Hi wallyglenn,

    Yes that should be possible – in broad outline this is the sort of strategy I’d suggest here:

    • You need to “listen” for the widget being displayed … the widget_display_callback hook will effectively allow you to do this and to differentiate between different instances of the same widget – letting you target just one of them
    • Once you identify the widget you need to modify you can set up a further filter using the tribe_events_list_widget_query_args hook – this makes it possible to alter the arguments used in the event list widget query
    • Alter the query by adding a tribeHideRecurrence query variable (and set it to 1)
    • Don’t forget to clean up! You’ll need to remove your filter callback to avoid impacting on any other events list widgets

    I hope that helps 🙂

     

    #723424
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Listing multiple events in list widget with only one show’ is closed to new replies.