Restrict to today's events only in list widget

Home Forums Calendar Products Events Calendar PRO Restrict to today's events only in list widget

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1059984
    echidnaweb
    Participant

    Hi, 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!

    #1060511
    Nico
    Member

    Howdy @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,
    Nico

    #1060519
    echidnaweb
    Participant

    Hey 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

    #1061789
    Nico
    Member

    Hi @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,
    Nico

    #1064229
    echidnaweb
    Participant

    This reply is private.

    #1064514
    Nico
    Member

    This reply is private.

    #1067049
    echidnaweb
    Participant

    This reply is private.

    #1067859
    Nico
    Member

    This reply is private.

    #1067998
    echidnaweb
    Participant

    This reply is private.

    #1069767
    Nico
    Member

    This reply is private.

    #1070892
    Nico
    Member

    Dave,

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

    #1079623
    echidnaweb
    Participant

    Brilliant, that’s working perfectly.

    Thanks for all your patience and help Nico!

    Dave

    #1079700
    Nico
    Member

    Hey 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

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Restrict to today's events only in list widget’ is closed to new replies.