Filtering Bar and extending the TribeEventsFilter class – any hints?

Home Forums Calendar Products Events Calendar PRO Filtering Bar and extending the TribeEventsFilter class – any hints?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #209605
    mggillespie
    Participant

    This had been brought up here, https://theeventscalendar.com/support/forums/topic/improve-customizability-of-filter-bar/ — and the suggestion had been made “but you can certainly build your own by extending the TribeEventsFilter class. It’s definitely something where some PHP and WordPress development know-how would be needed – but is absolutely achievable.”

    Could you lend any hints as the “safe” way to do this with your plugin?

    #210250
    Barry
    Member

    Sure – so you could either set this up within your theme, as part of the functions.php file or another file which is included from there (or, perhaps preferably, as a standalone plugin). We can’t guide you through that, but there are plenty of resources especially within the WordPress Codex to get you started on the right foot 🙂

    From there the idea would be to take a look at any of the existing filters that live in the-events-calendar-filterbar/lib/filters/* and use them as a blueprint for your own filter: note that they all extend from TribeEventsFilter (itself defined in the-events-calendar-filterbar/lib/tribe-filter.class.php) which takes care of many tasks common to most Filter Bar filters – including registration.

    You will of course need to instantiate your new class and ensure the TribeEventsFilter constructor still runs to take advantage of this.

    It’s definitely a more advanced topic than we can guide you through here, but I hope that at least gives you some avenues to explore.

    Thanks!

    #215009
    mggillespie
    Participant

    Thanks, that does help as a roadmap. I will try this over this next week and get back to you if I run into problems.

    #215457
    Barry
    Member

    Awesome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Filtering Bar and extending the TribeEventsFilter class – any hints?’ is closed to new replies.