How to hide all day events on Calendar?

Home Forums Calendar Products Events Calendar PRO How to hide all day events on Calendar?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #777907
    B
    Participant

    Hi,

    How to hide all day events on my calendar? I really need to change it, beacause users think my website have only three events. I don’t want to show similar events on all day of my calendar.

    Please see the screenshot: http://postimg.org/image/54pfaqcez/

    Is there any options just like this, on calendar listing first only one day events, after all day events or all day events show on calendar only on begin date, other days will be hide on calendar.

    #779624
    Josh
    Participant

    Hello B,

    Thanks for reaching out to us!

    This can be accomplished by customizing the month view of the calendar. You can follow the Themer’s Guide to override the “month > single-event.php” file and add a conditional to check whether the $start of the event came before the current $day. If so, you can have it not show the event in that view.

    I’m sorry I wasn’t able to give you a direct response however I hope this was able to point you in the right direction.

    Thanks!

    #780026
    B
    Participant

    This reply is private.

    #782154
    Josh
    Participant

    Hello B,

    Thanks for following up with us!

    Unfortunately, I’m unable to provide specific step by step instructions for customizing views within the forums, hopefully I can add a bit of clarity to the previous response to help better point you in the right direction.

    The first step will be to follow the steps in the Themer’s Guide to copy the files from The Events Calendar plugin into your theme. This will allow you to add the necessary customization for the way you would like the events to display. In this case, it will be the “views > month > single-event.php” file that will be copied to your theme.

    After the file is copied to your theme, you can use a PHP conditional to compare the values of two variables that are already set within that file, the current date and the event start date. To start, you’ll need to convert the $day value to a format that can be compared to the $start value.

    $current_date = strtotime($day['date']);

    With that new variable set, your conditional will now use the $current_date and $start values to check whether or not the event started before the current date.

    I’m sorry I wasn’t able to give you a direct response however I hope this was able to point you in the right direction.

    Thanks!

    #958997
    Josh
    Participant

    Hey,

    It’s been a while since we’ve heard from you on this thread.

    I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new one.

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to hide all day events on Calendar?’ is closed to new replies.