- This topic has 9 replies, 2 voices, and was last updated 6 years, 9 months ago by
Tom.
-
AuthorPosts
-
August 9, 2016 at 12:08 am #216774
Terry
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
August 9, 2016 at 8:40 am #216869Tom
Lead DeveloperLead DeveloperHi Terry,
This is the function you’re looking for: https://generatepress.com/forums/topic/issues-with-the-events-calendar/#post-176870
You just replace “no-sidebar” with one of the other options: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/ (at the bottom)
August 9, 2016 at 9:49 pm #217066Terry
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:
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
August 10, 2016 at 12:08 am #217084Tom
Lead DeveloperLead DeveloperIt looks like the sidebar is there, there’s just nothing in it.
In “Appearance > Widgets”, is there anything in the left sidebar area?
August 10, 2016 at 3:05 pm #217262Terry
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:
and here’s the Sidebar Manager setup:
Thanks, Tom!
Terry
August 10, 2016 at 4:14 pm #217284Tom
Lead DeveloperLead DeveloperHmm, so it’s probably an issue with that plugin + GP.
What if you try a plugin like: https://en-ca.wordpress.org/plugins/display-widgets/
August 10, 2016 at 4:18 pm #217286Terry
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
August 11, 2016 at 12:23 am #217333Tom
Lead DeveloperLead DeveloperI 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?
August 11, 2016 at 12:33 pm #217484Terry
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
August 11, 2016 at 2:38 pm #217520Tom
Lead DeveloperLead DeveloperGlad I could help, and thanks for your donation! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.