Event Search Bar Placement

Home Forums Calendar Products Events Calendar PRO Event Search Bar Placement

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #942245
    DAVE
    Participant

    Hi,

    What is best practise to change the location of the event search bar, can this be hooked in after the ‘Filter Bar’ for example?

    Thanks,
    David.

    #942303
    Barry
    Member

    Hi David,

    There are a few ways you could tackle this and a great starting point for an overview of safely overriding and customizing our templates can be found in our Themer’s Guide, so that’s well worth reading first of all 🙂

    If you take a peek at the month.php template in the first instance you will see it includes this line:

    <?php tribe_get_template_part( 'modules/bar' ); ?>

    Removing it from there, and placing it somewhere in month/content.php instead (depending on where you want it to go) would be one possibility.

    Alternatively, you could “inject” it by using any of the available action hooks, something like this:

    add_action( 'tribe_events_after_header', 'insert_main_tribe_bar' );
    
    function insert_main_tribe_bar() {
        tribe_get_template_part( 'modules/bar' );
    }

    Of course you would still need to remove the originally placed bar from each of the main templates.

    Does that help at all?

    #942320
    DAVE
    Participant

    Perfect and thank you for the detail!

    Thanks.

    #942384
    Barry
    Member

    Happy to help 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Event Search Bar Placement’ is closed to new replies.