Adding Filter Bar to Additional Page

Home Forums Calendar Products Filter Bar Adding Filter Bar to Additional Page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #965379
    Sarah
    Participant

    Hi, I’m hoping to add the filter bar to an additional view of the calendar. I’ve created a new page template that pulls events from a specific (parent) category using the list view, but I’d like to include the filter bar for this page as well.

    I’ve embed the code from the filter bar’s horizontal view into the template, but it’s not loading properly. I *think* I still have to enqueue a script in functions.php to get it load properly, but I’m having trouble doing so.

    What should this script look like to enqueue filter-script.js? Or is there an easier way to accomplish this.

    #965511
    Barry
    Member

    Hi Sarah,

    We’ve got an example of registering and building a new view on GitHub and if you follow that sort of approach I think this would just happen “automagically”.

    Beyond that, if you take a peak at TribeEventsFilterView::enqueueStylesAndScripts() (found in the-events-calendar-filterbar/lib/tribe-filter-view.class.php) you can see our own code used for this and perhaps call it directly or repurpose those parts you need?

    #968756
    Barry
    Member

    Hi!

    It’s been a while so I’m going to go ahead and close this topic.

    • Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
    • Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Adding Filter Bar to Additional Page’ is closed to new replies.