Adding Sidebar to Single Event

Home Forums Calendar Products Events Calendar PRO Adding Sidebar to Single Event

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #164414
    amplifiedsteve
    Participant

    Hello,

    I would like to show Events as full page and single events with custom sidebar. There is some information on how to do this on this thread – https://tri.be/support/forums/topic/4-questions-on-sidebars-map-page-meta-and-excerpt/ – however it’s not clear enough for me.

    So if anyone knows a tutorial, or could explain it here, that would be great.

    Thanks

    #166206
    Barry
    Member

    Hi!

    The first thing is to visit the Events → Settings → Display admin screen – what template are you using? I’m going to assume the Default Events Template, but it might in fact be your theme’s Page Template or indeed something else. You’d want to modify these instructions to suit.

    In the case of the Default Events Template you can override this and set up your own copy within your theme (see our Themer’s Guide for details) so it would basically live at:

    {your_theme}/tribe-events/default-template.php

    You would then customize this to add a sidebar in a suitable place. What works well for you/your theme is something you’ll probably need to discover through trial and error. At code-level adding the sidebar could be as simple as this, though:

    get_sidebar();

    Once you’re happy with this you will want to control when it is pulled in (since you only wish to see it on single event pages). To do so, you just need an extra statement preceding your code to load the sidebar. Here’s an example:

    if ( tribe_is_event_query() && is_singular() ) get_sidebar();

    Does that help?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Adding Sidebar to Single Event’ is closed to new replies.