Home › Forums › Calendar Products › Events Calendar PRO › Restrict to today's events only in list widget
- This topic has 12 replies, 2 voices, and was last updated 10 years, 2 months ago by
Nico.
-
AuthorPosts
-
January 21, 2016 at 8:54 am #1059984
echidnaweb
ParticipantHi, is it possible for the list-widget to only display today’s events (and not show the next day’s events if they don’t meet the ‘total number of days to show’ in the wp-admin widget settings)?
Thanks!
January 22, 2016 at 6:19 am #1060511Nico
MemberHowdy @echidnaweb,
Welcome to our support forums and thanks for reaching out to us!
is it possible for the list-widget to only display today’s events?
Sure, you’ll need to add the following snippet to your theme’s functions.php file (located at wp-content/themes/your_theme/):
https://gist.github.com/niconerd/1ea01513ecb3717de67c
Please give it a try and let me know about it,
Best,
NicoJanuary 22, 2016 at 7:02 am #1060519echidnaweb
ParticipantHey Nico,
Thanks very much for the speedy help. I tried adding the code to my functions.php file, but unfortunately it hasn’t had any effect. I’ve also tried flushing the cache etc in case I wasn’t seeing it, but still no luck…any suggestions?
Thanks
January 25, 2016 at 7:06 am #1061789Nico
MemberHi @echidnaweb,
Sorry to hear the snippet is not working for you 🙁
I’ve just re-tested on my local install and I can confirm it’s working for me, so maybe there are some differences in our WordPress set-up. Can you re-check the snippet is in the right place (the functions.php file of the active theme)?
It would be great if you could share your system information with me so I can check what version of the plugins you are using and also run some test with your same timezone settings.
Please let me know about it,
Best,
NicoJanuary 29, 2016 at 5:01 am #1064229echidnaweb
ParticipantThis reply is private.
January 29, 2016 at 8:28 am #1064514Nico
MemberThis reply is private.
February 3, 2016 at 8:16 am #1067049echidnaweb
ParticipantThis reply is private.
February 4, 2016 at 12:54 pm #1067859Nico
MemberThis reply is private.
February 5, 2016 at 1:42 am #1067998echidnaweb
ParticipantThis reply is private.
February 8, 2016 at 1:42 pm #1069767Nico
MemberThis reply is private.
February 10, 2016 at 8:08 am #1070892Nico
MemberDave,
Thanks for the patience on this!
So to limit the list below the mini calendar widget you’ll need to create a template override of the file ‘wp-content/plugins/events-calendar-pro/src/views/pro/widgets/mini-calendar/list.php’. If you already have an override for that file, there’s no need to create a new one. Our themer’s guide describes in detail the process of creating template overrides if you are not sure about it!
Once you have the override in place, go ahead and add the following lines:
...
...
Please give that a try and let me know if it works as expected,
Best,
NicoFebruary 22, 2016 at 3:15 am #1079623echidnaweb
ParticipantBrilliant, that’s working perfectly.
Thanks for all your patience and help Nico!
Dave
February 22, 2016 at 6:36 am #1079700Nico
MemberHey Dave,
Glad to be of service 🙂
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘Restrict to today's events only in list widget’ is closed to new replies.
