Home › Forums › Calendar Products › Events Calendar PRO › Sidebar on Single Event for Genesis Theme
- This topic has 8 replies, 3 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
September 22, 2013 at 7:41 pm #67204RobertParticipant
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?
September 23, 2013 at 7:44 am #67257BarryMemberHi 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!
September 24, 2013 at 2:40 pm #67561RobertParticipantActually 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,
RobSeptember 24, 2013 at 5:57 pm #67592BarryMemberhttps://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.
September 25, 2013 at 5:43 am #67639RobertParticipantHi Barry,
Have activated the code as indicated and checked that the default events template is active. It’s not returning the single sidebar though.September 25, 2013 at 8:32 am #67668BarryMemberRight, 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.
September 26, 2013 at 6:02 am #67805RobertParticipantUnderstand Barry. I’ll keep plugging away at this.
September 27, 2013 at 9:36 am #67998BarryMemberSure 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 🙂
July 7, 2015 at 6:28 am #981063Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Sidebar on Single Event for Genesis Theme’ is closed to new replies.