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

Home Forums Support [Resolved] Sidebar on Events Calendar pages (esp. Single Event View)

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

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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

    #216869
    Tom
    Lead Developer
    Lead Developer

    Hi 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)

    #217066
    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

    #217084
    Tom
    Lead Developer
    Lead Developer

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

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

    #217262
    Terry

    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

    #217284
    Tom
    Lead Developer
    Lead Developer

    Hmm, 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/

    #217286
    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

    #217333
    Tom
    Lead Developer
    Lead Developer

    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?

    #217484
    Terry

    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

    #217520
    Tom
    Lead Developer
    Lead Developer

    Glad I could help, and thanks for your donation! ๐Ÿ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.