Full-width calendar gridview

Home Forums Calendar Products Events Calendar PRO Full-width calendar gridview

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #46259
    Ken
    Participant

    Hello,

    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

    #46275
    Andy Fragen
    Moderator

    Ken, have you tried Settings > Display tab and set to ‘Default Events Template’. See if that does what you want.

    #46276
    Barry
    Member

    Yeah 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)?

    #46277
    Barry
    Member

    (I think we posted at the same time there Andy – wasn’t trying to cut you off 😉 )

    #46279
    Andy Fragen
    Moderator

    This reply is private.

    #46280
    Ken
    Participant

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

    #46295
    Barry
    Member

    OK … right now I see that both the upcoming events list and the calendar view include a sidebar: which template are you using just now?

    #46319
    Ken
    Participant

    Barry,

    At this moment, the calendar is set to use “Default page template”.

    -Ken

    #46325
    Barry
    Member

    OK, 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.

    #46327
    Ken
    Participant

    Barry,

    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

    #46328
    Ken
    Participant

    That’s not the right code. This is: http://pastebin.com/YaVYzS4j

    #46340
    Barry
    Member

    Great, 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.

    #46347
    Ken
    Participant

    Thanks, 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

    #46356
    Barry
    Member

    Not at all, thanks for posting back with the solution – it’s often really helpful for others.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Full-width calendar gridview’ is closed to new replies.