Search Bar – Closed by Default (at least on mobile)?

Home Forums Calendar Products Events Calendar PRO Search Bar – Closed by Default (at least on mobile)?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1005845
    Courtney
    Participant

    On mobile, the (then stacked) search bar is huge and takes up a big chunk of the view. It would be nice if it could default to closed on mobile. Is this possible?

    #1006046
    Nico
    Member

    Hey Courtney,

    Thanks for reaching out to us!

    Hopefully this is done automatically, but not sure if this is still too big for you or if it’s not collapsing at all.

    Can you share the site URL with me so I can take a look? I’ve tried accessing the URL you posted by it prompts for a user and pass. If they are necessary please be sure to mark the reply as private.

    Best,
    Nico

    #1006123
    Courtney
    Participant

    This reply is private.

    #1006572
    Nico
    Member

    Hi Courtney,

    Thanks for following up on this! I can see the filters are not collapsed on mobile because the calendar only haves one view enabled (map view). If you are planning to enable more views, just ignore this and when add them the filters will collapse automatically. If you are planning to stay with this set up, just paste this code into your functions.php file -located at wp-content/themes/your_theme/– or if you have a custom javascript file in your theme just add the js code there:


    function tribe_collapse_filters() { ?>
    <script type="text/javascript">
    jQuery(document).ready(function (){
    if ( jQuery('#tribe-events-bar').length ) {
    jQuery('#tribe-bar-collapse-toggle').addClass('tribe-bar-filters-open');
    jQuery('.tribe-bar-filters').hide();
    }
    });
    </script>
    <?php
    }
    add_action('wp_head', 'tribe_collapse_filters');

    Please let me know if this does the trick for you,
    Best,
    Nico

    #1007183
    Courtney
    Participant

    That works. Thanks!

    #1007195
    Nico
    Member

    Hey Courtney,

    Glad to hear 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best of luck with your projects,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Search Bar – Closed by Default (at least on mobile)?’ is closed to new replies.