Support

Home Forums Event Espresso Premium Hide Time on Specific Events

Hide Time on Specific Events

Posted: September 22, 2023 at 8:53 am


pathwise

September 22, 2023 at 8:53 am

Hello,

We have a type of an event where it doesn’t start and end at specific times so we just don’t want to have a time showing at all, if possible. I know I could add CSS to display none but this would be mean I would have to do this every time I create an event of this type.

Is there a way to have no time just a date for an event OR maybe have it set to all day?

Thank you.


Tony

  • Support Staff

September 25, 2023 at 2:13 am

Hi there,

We don’t currently have the option to set events/datetimes to be ‘all day’ within EE.

How do you differentiate these events? For example are they all in a specific category/categories?

I’m thinking you could use some CSS to target the category class added to the post and then target the DateTime from that to hide the times with CSS.

Would that work?


pathwise

September 25, 2023 at 7:22 am

I was thinking along the same line… They do have their own category. So if I can target that specific category using CSS. I will try and let you know how it goes. ๐Ÿ™‚


pathwise

September 25, 2023 at 8:52 am

On this page, I am trying to target the electrofishing events.

I see that

#espresso_calendar  .time-display-block  {
	display:none; 
}

works to remove the timestamp from all the events… I added .electro-cert to this but it isn’t working.

#espresso_calendar .time-display-block .electro-cert  {
	display:none; 
}

I am not sure what else I could use to distinguish it.


pathwise

September 25, 2023 at 8:58 am

When trying to remove the timestamp for the individual event pages, when I add the following code to the custom CSS section:

.espresso_event_categories-electro-cert span.ee-event-datetimes-li-timerange {
	display: none;
	
}

It does work initially, but once saved, the timestamp has returned.


Tony

  • Support Staff

September 25, 2023 at 11:02 am

Where are you adding that code? It looks like the page is cached so you’ll likely need to purge the cache for it to show.

I’d recommend excluding the /events/* pages from caching if possible.

On this page, I am trying to target the electrofishing events.

Go to Dashboard -> Event Espresso -> Calendar.

Find ‘Enable CSS for Categories’

Set that to Yes and save.

Does it work now?


pathwise

September 25, 2023 at 2:11 pm

Hello Tony,

I set the ‘Enable CSS for Categories’ to Yes. ๐Ÿ™‚

But it still wasn’t working – but I am going to keep trying.

Right now, I’d like to shift our attention to a CSS change I made a few weeks ago that was working at the time and now I see it isn’t.

On this event I hid all of the dates and times on the top of the page using:

/*Remove date and times on Career Mentoring Event*/
#ee-event-datetimes-ul-19909 {
	display: none;
}

Now I see it doesn’t work.


pathwise

September 25, 2023 at 2:12 pm

I purged the cache.


Tony

  • Support Staff

September 25, 2023 at 2:49 pm

Right now, Iโ€™d like to shift our attention to a CSS change I made a few weeks ago that was working at the time and now I see it isnโ€™t.

Where did you add that code?


pathwise

September 26, 2023 at 9:27 am

I added it in WP-Admin > Appearance > Customize > Additional CSS


Tony

  • Support Staff

September 26, 2023 at 9:36 am

That isn’t being added to the page anywhere that I can see, does it still show in that section?


pathwise

September 26, 2023 at 12:53 pm

Yes, I still see it in the Additional CSS section: https://snipboard.io/yvdw1i.jpg


Tony

  • Support Staff

September 26, 2023 at 1:39 pm

The code from that section stops right after this comment:

https://monosnap.com/file/tFNtwfQoYEzQmJQiGj4ETWZc9i2w18

/*If the screen size is 1025px or less, hide Team-Desktop*/

If you search within the above section for that comment, what do you see?


pathwise

September 26, 2023 at 2:34 pm

Thank you for pointing this out. That would explain some other non-related CSS problems I was having…

I got it along with the other CSS changes I wanted to make. ๐Ÿ™‚

The support post ‘Hide Time on Specific Events’ 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.

Event Espresso