How do disable search bar for filtering?

Home Forums Calendar Products Events Calendar PRO How do disable search bar for filtering?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1022529
    fifteen15studios
    Participant

    Hi 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,
    Brendan

    #1022736
    Brook
    Participant

    Howdy 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

    #1022944
    fifteen15studios
    Participant

    Ok, but where does this code go? I didn’t see it listed anywhere.

    #1022948
    fifteen15studios
    Participant

    Oh, 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.

    #1023544
    Brook
    Participant

    I 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

    #1075507
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How do disable search bar for filtering?’ is closed to new replies.