Home › Forums › Calendar Products › Events Calendar PRO › How do disable search bar for filtering?
- This topic has 5 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
November 6, 2015 at 7:10 am #1022529
fifteen15studios
ParticipantHi Modern Tribe,
I would like to disable the search bar on our site. how do I do that? I did it once, but it returned when we updated our scripts to the new version. What I did was create my own using the same IDs and code from the search bar which was already present, and disabled the default one which came with the system. The default one’s back, and I’d like to remove it.
Thanks,
BrendanNovember 6, 2015 at 4:09 pm #1022736Brook
ParticipantHowdy Brendan,
I would love to help you with this. I am not totally sure I understand how you removed it before, but I definitely know how you can remove it now.
If you add_filter() to ‘tribe-events-bar-filters’ you will get an array of filters being added to the Tribe Bar. To remove one, such as the search bar, just unset it’s array key. The array key for the search is ‘tribe-bar-search’. So unset that and it’s gone! This tutorial elaborates on this, and even includes some example code: Customizing the Tribe Bar.
Does that all make sense? Will that work for you? Please let me know.
Cheers!
– Brook
November 7, 2015 at 8:02 pm #1022944fifteen15studios
ParticipantOk, but where does this code go? I didn’t see it listed anywhere.
November 7, 2015 at 8:06 pm #1022948fifteen15studios
ParticipantOh, and I should clarify further. I’m not just interested in removing the search bar. I want the whole filtering box gone. I don’t want the <form> tag to appear anywhere in my script. I created another using a different form tag with the same ID so I can’t have them overlap.
November 9, 2015 at 5:41 pm #1023544Brook
ParticipantI understand now. Thank you for clarifying.
If you wish to remove the entire Tribe Bar, and not just parts of it, then it will be a little simpler! You will find the code that outputs that bar here: /wp-content/plugins/the-events-calendar/src/views/modules/bar.php. If you create a theme override for that file by following our Themer’s Guide, then you can safely edit the <form>, even deleting it entirely.
Does that all make sense? Make sure to click the link to the Themer’s Guide as it contains step-by-step instructions on how to create an “override”.
Cheers!
– Brook
February 18, 2016 at 8:30 am #1075507Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘How do disable search bar for filtering?’ is closed to new replies.
