Sidebar on Single Event for Genesis Theme

Home Forums Calendar Products Events Calendar PRO Sidebar on Single Event for Genesis Theme

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #67204
    Robert
    Participant

    Hi guys,

    Very simply, I’m trying to get a sidebar on single event pages.
    I am using Genesis 2.0.

    I joined another thread to ask this but was suggested to create a new one.
    So far I have tried the following:
    add_filter(‘genesis_pre_get_option_site_layout’, ‘tribe_single_layout’);
    function tribe_single_layout($opt) {
    if (is_singular() && tribe_is_event())
    $opt = ‘content-sidebar’;
    return $opt;
    }

    I thought this should be activating but it’s not quite hooking. I don’t believe it’s an issue with the genesis declarations I’m making but the conditionals for the event single pages:

    Is ” if (is_singular() && tribe_is_event())” is the right in this case?

    #67257
    Barry
    Member

    Hi Robert,

    That ought to function as expected if you are using the Default Events Template setting (via Events → Settings → Display) – but if you are using the Default Page Template, for instance, it won’t work quite as you expect due to the way content is delivered in that situation. In other words, you won’t be able to rely on tribe_is_event() quite so early in the request.

    If that’s the case you might switch tribe_is_event() to tribe_is_event_query() (though note that in this form the test would also change the layout for other single event types, like venues and organizers – if that’s not acceptable you’d need to tweak a little further).

    Hope that helps!

    #67561
    Robert
    Participant

    Actually Barry, I am using the default events template but it’s not having the effect.
    I shall try a little more tonight and let you know.
    Thanks,
    Rob

    #67592
    Barry
    Member

    https://tri.be/support/documentation/events-calendar-themers-guide/Definitely, just let us know. It certainly worked for me insofar the code ran on the appropriate filter and returned ‘content-sidebar’ as expected – however it’s entirely possible that was overwritten in turn later in the request or of course just wasn’t sufficient to achieve the end goal.

    #67639
    Robert
    Participant

    Hi Barry,
    Have activated the code as indicated and checked that the default events template is active. It’s not returning the single sidebar though.

    http://nagoya-info.com/event/treasure-island-111013/

    #67668
    Barry
    Member

    Right, but the .content-sidebar body class is present (and that’s probably the result of your snippet) – you’d really need to dig in to Genesis here to figure the rest out and, I’m afraid, that’s not something we can help too much with.

    #67805
    Robert
    Participant

    Understand Barry. I’ll keep plugging away at this.

    #67998
    Barry
    Member

    Sure thing, it would be awesome if you were able to figure things out and share. Of course if you have any further questions on that count that are specific to The Events Calendar definitely let us know 🙂

    #981063
    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 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Sidebar on Single Event for Genesis Theme’ is closed to new replies.