Moving items from filter bar to the top bar, and visa versa.

Home Forums Calendar Products Filter Bar Moving items from filter bar to the top bar, and visa versa.

  • This topic has 3 replies, 4 voices, and was last updated 10 years ago by james lazar.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1144296
    james lazar
    Participant

    Hi,

    I’m looking to move the “distance” drop down menu to the top bar next to the “location” box.

    I also want to move the “search” box down into the filter bar.

    Is this easy to do? as simple as moving some php code about or is it more complicated?

    #1144967
    Brook
    Participant

    Howdy James,

    I would love to help you with this. It’s not the easiest thing, the Filter Bar and Tribe bar behave differently so it will not be a simple matter of moving code. But if you’re pretty versed in PHP it seems very doable.

    First of all you want to remove/add HTML to the top “Tribe bar”. This is pretty easy, and we have a full tutorial for this here including some examples: Customizing the Tribe Bar If I were you I would just add an HTML distance form with the same name/ID as the tribe bar one. And there you have if, you’ve removed one guy from the Tribe Bar and added your own.

    Now you will need to create a new Filter for the Filter Bar. You will do this by extending Tribe__Events__Filterbar__Filter just like all of our filters do. You can see plenty of examples on how to extend this in the-events-calendar-filterbar\src\Tribe\Filters\ The trickiest part will be needing to override the displayFilter() method with your own version, since this will not be a typical filter field. Now you just need to call/construct this new class you’ve created, and it will be added to the available filters in WP-Admin > Events > Settings > Filters. Select it, hit save, and it will appear on the front end.

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1153205
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Moving items from filter bar to the top bar, and visa versa.’ is closed to new replies.