Home › Forums › Calendar Products › Events Calendar PRO › How to hide all day events on Calendar?
- This topic has 4 replies, 2 voices, and was last updated 10 years, 12 months ago by
Josh.
-
AuthorPosts
-
September 30, 2014 at 4:50 am #777907
B
ParticipantHi,
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.
September 30, 2014 at 8:32 pm #779624Josh
ParticipantHello 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
$startof 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!
October 1, 2014 at 12:52 am #780026B
ParticipantThis reply is private.
October 1, 2014 at 10:41 pm #782154Josh
ParticipantHello 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
$dayvalue to a format that can be compared to the$startvalue.$current_date = strtotime($day['date']);With that new variable set, your conditional will now use the
$current_dateand$startvalues 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!
April 28, 2015 at 8:34 am #958997Josh
ParticipantHey,
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!
-
AuthorPosts
- The topic ‘How to hide all day events on Calendar?’ is closed to new replies.
