Remove Sidebar on Community Events

Home Forums Calendar Products Community Events Remove Sidebar on Community Events

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #21598
    Tony
    Participant

    I can’t find the template that includes the sidebar in the community events.

    I need to remove the sidebar because Dynamic Widgets plugin doesn’t play well with your plugin. As a result it includes every sidebar causing the page to crash.

    I’ve tried using the default events page template, created a new page template and assigned it to the events page and still nothing will remove the sidebar from the community page.

    What fix or workaround can I get to remove the sidebar on the community events of adding or listing events? I’ve tried searching through the community events views, but I can’t find the template part that includes the sidebar.

    #21619
    Joyce Grace
    Member

    Hello Tony,

    Can you please link to your site when posting requests for help like this?

    Also, have you had a look at our Themer’s guide for a solution to this yet? https://theeventscalendar.com/themers-guide-to-the-events-calendar/

    You may need to create a new template, since the templates included by default may not work well with your theme (by the sounds of it). However this is really a customization issue, so there’s only so far we can go to help out.

    We also have technical documentation here: https://theeventscalendar.com/support/documentation

    You could also try replacing the Dynamic Widgets plugin with something else to achieve what you want it to do.

    #21685
    Joyce Grace
    Member

    Hello Tony,

    I see you tried to leave a message here that is not appearing:


    Hey Joyce. I’ve already been on the documentation site and have created my templates by copying the files from the plugin to my own custom theme. The problem I’m running into is that I’ve been able to remove the sidebar from the Events calendar and single event views, but I cannot find where I can remove the code snippet on the community events. The problem is that we use Dynamic Widgets plugin for all the other pages. It recognizes your custom post types but it will not include/exclude widgets on the page. So knowing that we decided that for this section alone we will just remove the sidebar all together. So I’m all asking is… “in what template for the Events Community can I use remove the sidebar. I haven’t found it yet and I’m still digging around for the file.” The link to our site is http://www.evolvhealth.com/events

    On that note, I am going to try to see if I can get someone to help you who might know better than I do.

    Sorry for the delay!

    #21705
    Jonah
    Participant

    Hi Tony,

    The Community Events plugin uses your theme’s page.php template so you’ll want to edit that and use the following conditional code to detect when you are on one of the community pages and show/hide whatever sidebar you want that way:

    if(tribe_is_community_my_events_page()) {
    echo 'this is the my events page!';
    }

    if(tribe_is_community_edit_event_page()) {
    echo 'this is the submit/edit events page!';
    }

    I hope that helps!

    – Jonah

    #21735
    Tony
    Participant

    To keep me from running into errors, how would I do this if the plugin was deactivated, what it sounds as though is I should create a custom page template specifically for the events calendar and then place this logic in it then assign that page template to the events plugin in the settings.

    Am I correct in my thinking on this?

    #21807
    Rob
    Member

    Hey Tony: even if the plugin is deactivated, you should still be able to add this code (then have it take effect when you activate the plugin). Alternatively you could always do it on a testing / staging site so there was no chance of a negative impact in your live environment.

    Have I misunderstood the question here? Let em know if so, and I’ll get you what you need to succeed.

    #21844
    Michael
    Participant

    Rob, is there any documentation where all these functions are?

    Tony- I will be using the following code to first check if the function exists before checking executing the function:

    if( function_exists(‘tribe_is_community_edit_event_page’) && tribe_is_community_edit_event_page() )

    Do the same for any other functions.

    #21847
    Michael
    Participant

    This is the code that I actually used in my if statement that activates code I want displayed only if it is not a community event page:

    !(function_exists(‘tribe_is_community_edit_event_page’) && (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) )

    #21849
    Michael
    Participant

    And make sure to use single quotes and not the magic quotes that were inserted by the forum software.

    #21916
    Tony
    Participant

    @jonah, instead of using page.php could we not just assign a new page template in the events settings and have that be used for community page or is does it exclusively use page.php. Could I use something like, page-events.php?

    #21964
    Karin Ettenson
    Participant

    I am with Tony on this, I would really like to specify which template page the submit an event form is on.

    This would be a simple feature to add I think, a dropdown of published pages on the settings page to select which page to use for the submission form, the user submitted events and so on, page.php being default if not specified.

    For my clients I setup an private login area with custom styles, they can edit their own pages and listings, but for me to custom the event submissions to use the same styles I can either write a bunch of if statements or edit the events plugin which would be messy.
    ‘template’ => array(
    ‘page.php’,
    dirname( __FILE__ ) . ‘/page.php’
    )

    #22032
    Jonah
    Participant

    Hi guys,

    Unfortunately there is no option for using a different page template at this time although we will likely add an option for it in the future. For now you’ve got to work with page.php. Let me know if you guys have any other questions on this.

    Cheers,
    Jonah

    #25590
    Dante Fillyau
    Participant

    Jonah:

    I am facing the same issue, but on my template it is like this:

    How do I comment it out for the community events page. I need this sidebar removed from this page. Please assist.

    #25591
    Dante Fillyau
    Participant

    Nevermind I figured it out.

    #26181
    Leah
    Member

    Glad to hear it Dante 🙂

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Remove Sidebar on Community Events’ is closed to new replies.