Headache: different sidebar for Event List and Single Event pages

Home Forums Calendar Products Events Calendar PRO Headache: different sidebar for Event List and Single Event pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14333
    Nick
    Participant

    Hi,
    Can someone please help alleviate my headache? Basically I’ve setup two different sidebars ‘sidebar_eventlist.php’ and ‘sidebar_event.php’ with different content in them. I’d like one to show on the event list/calendar page and the other on the single event pages. That way you get different content for the list and then independent content for the events.

    I’ve tried doing this with a single sidebar template file and using an if/else statement to try to say if page=ID of the Events section of the site but this is not working. I presume it’s to do with how the plugin works.

    Any help would be greatly appreciated.
    Thanks,
    Nick.

    #14459
    Rob
    Member

    Hi Nick. Thanks for the note here and sorry that it took a couple of days to respond here…somehow this one slipped through the cracks when we hit the forum yesterday. While this is outside my realm of expertise I can certainly get our dev Jonah to take a look and see what he can offer up when he hits the forum this afternoon. Stay tuned.

    #14482
    Jonah
    Participant

    Hi Nick,

    You can use the following conditional code to check what page you are on and display each sidebar:


    if(tribe_is_month()) { // Calendar Grid

    } else if(tribe_is_event() && !tribe_is_day() && !is_single()) { // Event List

    } else if(tribe_is_event() && !tribe_is_day() && is_single()) { // Single Events

    } else {

    }

    Hope that helps!

    #14505
    Nick
    Participant

    Brilliant, many thanks for that. I’ll try it out and let you know how I get on.

    #14518
    Rob
    Member

    Sounds great, Nick. If you have any other questions after giving this a go please do let us know.

    #975521
    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 ‘Headache: different sidebar for Event List and Single Event pages’ is closed to new replies.