Site logo

Archived topic

Sidebar on Events Calendar pages (esp. Single Event View)

9 replies · Started by Terry on August 9, 2016

Viewing posts 1–10 of 10

I can't seem to get the sidebar working on Events Calendar pages. I tried searching the forums, but the only post I saw that seemed somehow related discussed HIDING the sidebar. Since I can't see it in the first place, I'm pretty sure that's not the answer.

Any suggestions on how to fix this?

Many thanks!

Terry

Hi Tom,

Thanks for your reply. I added this as a function using Code Snippets:

add_filter( 'generate_sidebar_layout','generate_custom_events_sidebar_layout' );
function generate_custom_events_sidebar_layout( $layout )
{
 	// If we are on a tribe events page, set the sidebar
 	if ( 'tribe_events' == get_post_type() || is_post_type_archive( 'tribe_events' ) )
 	 	return 'left-sidebar';

 	// Or else, set the regular layout
 	return $layout;

 }

The sidebar isn't appearing. Do I need to add a call to it into the default-template.php file? (I looked on Events Calendar forums and saw a reference to adding 'get_sidebar()' to it, but I don't quite understand where I'd have to put it if I do that.

This is a bit further complicated by the fact I'm using Sidebar Manager to create custom navigation sidebars. This link shows the sidebar I want:

Sidebar Navigation Working

and here is a link to one of the Events Calendar pages where I can't get it to show:

Single Events Listing - No Sidebar

I would appreciate any suggestions... Thanks, Tom!

Terry

It looks like the sidebar is there, there's just nothing in it.

In "Appearance > Widgets", is there anything in the left sidebar area?

No, there isn't... because I'm using Sidebar Manager to place different menus on different pages. So the menu I am trying to display shows in my widgets as "News & Events Menu". Here's the widget area:

News & Events Menu Widget

and here's the Sidebar Manager setup:

Sidebar Manager for Events section

Thanks, Tom!

Terry

With which plugin? Events Calendar? (The sidebar menus are working fine on all of the other pages.)

Do I maybe have to change the menu name to something different in the function I added to the code snippets?

Thanks, Tom - you rock. Hope you enjoy the 'cup of coffee'. You deserve it! :)

Terry

I was thinking it might be an incompatibility between GP + Events Manager + Sidebar Manager.

The function is working, as the sidebar HTML exists - it's just there's nothing in it.

What if you bypass the Sidebar Manager plugin just to test?

It did indeed work putting it in the left sidebar - thanks, Tom! (I hadn't done that because I thought it would show in the left sidebar of ALL the pages, but it seems to be grabbing the right menu as defined in the Ultimate Shortcodes widget... yay!)

I appreciate your help!

Terry

Glad I could help, and thanks for your donation! :)

This archived topic is closed to new replies.