I would like to be able to target individual components within the ee-event-datetimes-li class so as to be able to apply CSS. For example, this is what gets output to HTML for an event:
<strong>Week 2</strong>
<br>
<span class="dashicons dashicons-calendar"></span>
July 3, 2017 - July 7, 2017
<br>
<span class="dashicons dashicons-clock"></span>
9:00 am - 12:00 pm
<br>
- No class on July 4
I’d like to be able to, for instance, target the time range for special CSS treatment. Any way to achieve that?
The answer includes some information on how to override the espresso_list_of_event_dates() function. Once you have your custom function set up, you can wrap the items with span tags and give them classes. Then you’ll be able to target those items with CSS.
e.g. $html .= '<span class="dashicons dashicons-clock"></span>' . $datetime->time_range( $time_format );
can be changed to:
The support post ‘Target items in ee-event-datetimes-li for CSS’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.