Single event template – remove sidebar

Home Forums Calendar Products Events Calendar PRO Single event template – remove sidebar

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #14555
    Angelo
    Participant

    Hi, a default sidebar is appearing on my single Event pages only (list of Pages, Archives, Categories). The Events page does not have this issue. I would like to remove the sidebar from the single Event page.

    What is the best way to go about this?

    The Events page is using the default Events Template. The issue seemed to appear after updating to the latest version of WordPress…

    Thanks for your help 🙂

    #14560
    David
    Participant

    I am also having the same issue as Angelo.

    EXAMPLE

    If you go the the Events page on this site;

    http://www.woodysbyronbay.com/events

    … everything works fine.

    But if you click into any single event, a sidebar appears below the event thus;

    http://www.woodysbyronbay.com/event/live-local-music-richie-williams

    I had seen a solution some time ago for the older version of ECP which involved commenting out the sidebar in events-calendar-premium/view/single.php – this worked and the sidebar disappeared (under ECP 1.3.3)

    But I can’t find anywhere to do this in the new version.

    Any help much appreciated!

    Rgds David

    #14569
    Rob
    Member

    Thanks for the reports, guys. I’m going to see if Jonah from our dev team can take a look at this and share some insights. I know that the templating structure will be changing quite a bit for 2.1, which I suspect will resolve this…but I’ll try to see if there’s anything we can share in the short term.

    #14601
    Jonah
    Participant

    Hi all, it’s really going to depend on your theme and it’s hard to say exactly how to do this because the instructions are complex and vary. But generally you are either using the Default Events Template (ecp-page-template.php and ecp-single-template.php) or the Default Page Template (page.php). What you should be able to do is use conditional code in either of the templates depending on how you have this set in Settings > The Events Calendar:


    if ( tribe_is_month() ) { //no sidebar on grid view

    } else if ( tribe_is_event() && !tribe_is_day() && !is_single() ) { //set sidebar on list view
    get_sidebar();
    } else if ( is_singular() && tribe_is_event() ) { //set sidebar on single view
    get_sidebar();
    } else {

    }

    I hope that helps!

    #14622
    David
    Participant

    Hi Jonah – thanks for this 🙂

    Was able to fix by commenting out the sidebar in LINE 29 of: the-events-calendar/views/ecp-single-template.php

    original;

    changed to;

    #14623
    David
    Participant

    Whoops, cant post the php…

    original ****

    changed to ****

    #14626
    Jonah
    Participant

    Glad you worked it out David, if you need to post code in the comments, try either wrapping your code in tags or just use http://pastebin.com/

    Thanks,
    Jonah

    #14627
    Jonah
    Participant

    That was meant to read ‘' tags, without the spaces of course...

    #14628
    Jonah
    Participant

    Ughhh, ok html ‘code’ tags with html style arrows on either side of the tag.

    #14629
    Angelo
    Participant

    Unfortunately the supplied code didn’t work out for me, but I was able to duplicate the file
    and put it in a folder named EVENTS inside my theme folder, as stated at the top of the ‘ecp-single-template.php’ file.
    I just removed the sidebar reference all together (probably to dodgy thing to do?). This worked for me.

    #14630
    Jonah
    Participant

    Nope, that’s solution that works for now Angelo. Nothing dodgy about it.

    #14631
    Angelo
    Participant

    Great! Thanks for your help 😉

    #14647
    Rob
    Member

    Thanks for confirming, Angelo & David! Please let us know if we can do anything else.

    #975539
    Support Droid
    Keymaster

    This 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.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Single event template – remove sidebar’ is closed to new replies.