Move search bar above 'html before event content' section

Home Forums Calendar Products Events Calendar PRO Move search bar above 'html before event content' section

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1071121
    Graphic
    Participant

    Hello,

    In Advanced Template settings, if I add content to the “before event content” area, it displays as expected on pages that do not display the search bar. However on pages WITH the search bar (such as list view, month view, etc), the “before event content” displays first, pushing the search bar below it. Is there a way to rearrange the order on those pages so that the search bar is always displayed first?

    Thanks very much

    #1071236
    Cliff
    Member

    Hi Graphic. Thanks for your detailed question regarding Advanced Template settings at wp-admin > Events > Settings > Display.

    The content you put there is displaying as it’s supposed to: “Display HTML to output before the event template”, since what we call the Tribe Bar (search bar) is part of the event template.

    If you want some text/content displayed elsewhere (e.g. after Tribe Bar or Filter Bar), you’ll need to use one of our hooks.

    (While it’s not perfect, the plugin revealing some of our plugin’s hooks in my screenshots is called Simply Show Hooks.)

    An alternative method of finding hooks is to look into our plugin’s code and finding the hook(s) you want to use. For example, you might want to look in /wp-content/plugins/the-events-calendar/src/views/list/content.php and notice the tribe_events_before_the_title action, among many others there.

    If you’re not yet “in the know” about or fully comfortable with WordPress hooks, please start with a good introduction to WordPress hooks before starting to add PHP code to your child theme’s functions.php. It might seem daunting at first, but it’s a really powerful and freeing way to start getting exactly what you want from WordPress core, themes, and plugins! Try it, you’ll like it! 🙂

    I hope this information helps get you on your way!

    Please let me know.

    #1073870
    Graphic
    Participant

    Hi Cliff,

    Thanks for such a thorough explanation. I’ve never worked with hooks before but may have to try it out.

    t

    #1073883
    Cliff
    Member

    Glad to help!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Move search bar above 'html before event content' section’ is closed to new replies.