Home › Forums › Calendar Products › Events Calendar PRO › Full-width calendar gridview
- This topic has 13 replies, 3 voices, and was last updated 12 years, 12 months ago by
Barry.
-
AuthorPosts
-
April 18, 2013 at 1:21 pm #46259
Ken
ParticipantHello,
I’m trying to get my gridview calendar to span the width of the page with no sidebar displayed. I have such a page template, but when chosed in TEC PRO’s settings, it applied to the event list as well, whereas I want only the gridview to be full-width.
I’m using a child theme based off This Just In. It was still being actively developed when I launched my site four years ago; unfortunately, that’s the last time the theme was updated.
Here is the page where the calendar appears:
http://www.challengeblog.org/events/
Per this previous topic (closed before I could try implementing the proposed solution, my bad), I added this to my theme’s CSS:
.events-gridview #sidebar {
display: none;
}But it doesn’t seem to do much on its own (in fact, I can’t find .events.gridview in my page’s source) and am unsure what the next step is or would be.
Any help would be much appreciated!
–Ken
April 18, 2013 at 8:09 pm #46275Andy Fragen
ModeratorKen, have you tried Settings > Display tab and set to ‘Default Events Template’. See if that does what you want.
April 18, 2013 at 8:13 pm #46276Barry
MemberYeah I don’t think that would work in this particular case – perhaps you were using a different page template at the point where Jonah made that suggestion?
What if you use the default events template instead, does that work ok for you (though I appreciate it loads the sidebar by default – but we could easily add a conditional statement to work around that)?
April 18, 2013 at 8:15 pm #46277Barry
Member(I think we posted at the same time there Andy – wasn’t trying to cut you off 😉 )
April 18, 2013 at 8:50 pm #46279Andy Fragen
ModeratorThis reply is private.
April 18, 2013 at 8:58 pm #46280Ken
ParticipantThanks for the speedy volunteering, gents!
Andy: Choosing a different default template for the calendar also affects the list view:
http://www.challengeblog.org/events/upcoming/
I want to adjust just the gridview.
Barry: I changed the events template from default page template to default calendar template. Unfortunately, this too has changed both the calendar and list views to full width. I’d like the sidebar on the latter, if possible.April 19, 2013 at 6:13 am #46295Barry
MemberOK … right now I see that both the upcoming events list and the calendar view include a sidebar: which template are you using just now?
April 19, 2013 at 9:12 am #46319Ken
ParticipantBarry,
At this moment, the calendar is set to use “Default page template”.
-Ken
April 19, 2013 at 9:37 am #46325Barry
MemberOK, so every theme is different but if you’re comfortable editing its templates (follow your theme vendor’s advice here, such as doing this from within a child theme or whatever approach will make the changes “update resistant”) and you can locate a piece of code like this in the page.php template:
get_sidebar();We should be able to do something like this to hide it:
if (!tribe_is_month()) get_sidebar();Which will stop it from displaying on the month/grid view.
April 19, 2013 at 9:59 am #46327Ken
ParticipantBarry,
Awesome! That worked. I also changed the top of my page.php template’s code to set the width accordingly:
<div id="">
I’m not much of a programmer, so I don’t know if that’s the elegant solution, but it appears to be working as expected throughout my site.
Thanks again!
-Ken
April 19, 2013 at 10:01 am #46328Ken
ParticipantThat’s not the right code. This is: http://pastebin.com/YaVYzS4j
April 19, 2013 at 10:56 am #46340Barry
MemberGreat, yep that should do the trick, I don’t see anything wrong with that at all. If you wanted it to take up a little less space, just to make it easier when you next open up and work with that file, you might change it to:
<div id="<?php echo tribe_is_month() ? 'content-full' : 'content' ?>">But that’s essentially the same thing, just “re-worded” – functionally they should be identical.
April 19, 2013 at 11:50 am #46347Ken
ParticipantThanks, Barry! That’s working for me, too.
I have enough programming background to understand a language’s basic concepts and can often hack something together for my own purposes, but I haven’t programmed anything elegant enough to warrant release since 2000. I appreciate the help!
-Ken
April 19, 2013 at 12:31 pm #46356Barry
MemberNot at all, thanks for posting back with the solution – it’s often really helpful for others.
-
AuthorPosts
- The topic ‘Full-width calendar gridview’ is closed to new replies.
