• Resolved Haris

    (@kanuharis)


    Hi,

    Awsome plugin, thanks!

    Is there any option to change the color of the date if there is any event on that day? Any custom class maybe. I can see below class for the current day. I want to make the date color red if any events are available for that day. Thanks in advance.

    tribe-events-calendar-month__day--current

    • This topic was modified 1 year, 8 months ago by Haris.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Darian

    (@d0153)

    Hi @kanuharis

    ?Thanks for getting in touch.

    Unfortunately, there’s no built-in class for it, but I would be happy to point you in the right direction.

    Your desired use-case scenario may be possible with some custom coding, but if you decide to give that a try, please note we cannot provide full support for custom implementations like that.

    A good place to start would be our Themer’s Guide, if you’re comfortable doing it DIY. https://theeventscalendar.com/knowledgebase/themers-guide/

    More specifically, you could override this template \the-events-calendar\src\views\v2\month\calendar-body\day\cell.php by copying it to [your-theme]/tribe/events/v2/month/calendar-body/day/cell.php, and add your custom code that will check if it has any event for that day.

    I hope this helps, and please let me know if you have further questions or concerns.

    Thread Starter Haris

    (@kanuharis)

    Thanks!

    I can edit the template file, but the problem is checking whether there is an event for that day. Will wp-query work? Any help much appreciated

    Plugin Support Darian

    (@d0153)

    Hi @kanuharis

    You could try adding this snippet code

    $no_events_class = "";
    if(empty($day['multiday_events']) && empty($day['events'])){
    	$no_events_class = "MY_CUSTOM_CLASS";
    }

    See- https://share.getcloudapp.com/p9ueNqlB

    I hope this helps, and please let me know if you have further concerns.

    Plugin Support Darian

    (@d0153)

    Hi @kanuharis

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom class for date in month view if there is any event’ is closed to new replies.