Weekly view – hours displayed by default

Home Forums Calendar Products Events Calendar PRO Weekly view – hours displayed by default

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #972216
    cliffy
    Participant

    Hi, I saw the question in https://theeventscalendar.com/support/forums/topic/week-view-day-start-and-end-times/

    and see that this can be tweaked at the backend. I’m a real noob and have just installed TECpro.

    Many of my events go beyond what ever is the default display in the weekly view (5:30) so how can I modify this. Where do I start and why is it not in the user interface ?

    Hope you can help.
    Thanks

    #972432
    Brian
    Keymaster

    Hi,

    Sorry for the issues you are having. I can help out.

    I do not understand what you mean by this:

    “Many of my events go beyond what ever is the default display in the weekly view (5:30) so how can I modify this.”

    Is that 5:30am? Do you have a link to the page?

    Let me know and we can go from here.

    Thanks

    #972720
    cliffy
    Participant

    I don’t have a web link at the moment but I was assuming there was a default display setting for the weekly view?

    My weekly view starts at 10:00 AM and finishes at 6:00 PM

    I have events starting after 6:00 PM

    How do I make the view “Longer” on my page. i.e. show from 8:00 AM to 8:00 PM

    Thanks,

    (I am used to using the events plugin from Time.ly) … so my next question will be about colours for categories 🙂

    #972734
    Brian
    Keymaster

    Ok thanks for the info.

    You added this coding correct? That is set to show the hours between 7am to 6pm in each day of week view.

    If you want 8am to 8pm then change it to the following:

    <?php

    add_filter( 'tribe_events_week_get_hours', 'filter_week_hours' );

    function filter_week_hours( $hours ) {
    $hour = 0;

    foreach ( $hours as $key => $formatted_hour ) {
    if ( $hour < 8 || $hour > 20 ) {
    unset( $hours[ $hour ] );
    }

    $hour ++;
    }

    return $hours;
    }

    Let me know if that works out.

    Category Colors
    So we do not have Category Colors features built in, but Andy Fragen has a great plugin called The Events Calendar Category Colors that does it:

    The Events Calendar Category Colors

    I would check that out.

    Cheers

    #972750
    cliffy
    Participant

    Brian,

    I purchased the Enfold Theme, built my site, purchased TEC Pro – installed it – added some events.
    I have not coded anything.

    I am presuming by your reply I can not change the default (what ever the default is) through the user interface. Big shame 🙁

    OK, so you have sent some code. I’m a NOOB so please go easy on me.

    Which file should I be editing / creating ?

    Can I add this to the “Quick CSS” function in the Enfold settings?

    I do have a child theme set up – if the answer above is no, do I put this code in the child directory or normal directory?

    Sorry to be a pain.

    #972761
    Brian
    Keymaster

    Thanks for the info about the theme.

    Enfold actually modifies the events calendar so I would contact them first on why it is showing only 10am to 6pm as or default is to show the whole day from midnight to midnight for each day.

    And you would add that coding to the theme’s functions.php. It cannot go into the Quick CSS as it is php.

    It should go in a child theme’s functions.php to protect against theme updates, but the parent theme works too.

    Let me know what Enfold says and we can go from here.

    Thanks

    #972785
    cliffy
    Participant

    Brian,

    Thanks so much for your help. I have gone back to Kriesi at Enfold to get an answer. It seems they display 8.5 hours and set the start time of the view from the start time of the earliest event of that week. That would be OK for me if I just knew how to extend the number of hours displayed. This means your solution above would not work as you are defining a specific time period start and end rather than just how many hours to show, if that makes sense?

    Will wait until they respond (their support is really good) and report back.

    Thanks,

    #972828
    Brian
    Keymaster

    Sounds good. Let me know what they say.

    Cheers

    #985347
    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 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Weekly view – hours displayed by default’ is closed to new replies.