Home › Forums › Calendar Products › Events Calendar PRO › Single event template – remove sidebar
- This topic has 13 replies, 5 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
February 1, 2012 at 3:09 pm #14555
Angelo
ParticipantHi, 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 🙂
February 1, 2012 at 8:21 pm #14560David
ParticipantI 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
February 1, 2012 at 8:34 pm #14569Rob
MemberThanks 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.
February 2, 2012 at 4:55 pm #14601Jonah
ParticipantHi 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!
February 2, 2012 at 6:45 pm #14622David
ParticipantHi 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;
February 2, 2012 at 6:47 pm #14623David
ParticipantWhoops, cant post the php…
original ****
changed to ****
February 2, 2012 at 7:46 pm #14626Jonah
ParticipantGlad 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,
JonahFebruary 2, 2012 at 7:47 pm #14627Jonah
ParticipantThat was meant to read ‘
' tags, without the spaces of course...February 2, 2012 at 7:47 pm #14628Jonah
ParticipantUghhh, ok html ‘code’ tags with html style arrows on either side of the tag.
February 2, 2012 at 7:58 pm #14629Angelo
ParticipantUnfortunately 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.February 2, 2012 at 7:59 pm #14630Jonah
ParticipantNope, that’s solution that works for now Angelo. Nothing dodgy about it.
February 2, 2012 at 8:02 pm #14631Angelo
ParticipantGreat! Thanks for your help 😉
February 3, 2012 at 9:19 am #14647Rob
MemberThanks for confirming, Angelo & David! Please let us know if we can do anything else.
July 4, 2015 at 5:00 pm #975539Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Single event template – remove sidebar’ is closed to new replies.
