Support

Home Forums Event Espresso Premium Hiding start- date/time and end- date/time for events in the headline

Hiding start- date/time and end- date/time for events in the headline

Posted: January 28, 2020 at 5:14 am

Viewing 5 reply threads


dafaguru1

January 28, 2020 at 5:14 am

Hi,

got another question: we want to hide start -date/-time and end -date/-time in the headline of specific events (not for all events!). is that possible?

you can see it here:

https://abg-wuppertal.de/testseite/

thank you!


Tony

  • Support Staff

January 28, 2020 at 7:55 am

Hi there,

It may be possible.

May I ask, as it stands how do you identify the events you want to hide the dates from within EE?


dafaguru1

January 28, 2020 at 9:30 am

yes for sure, i’m gonna write the start and end time in the description of the event and the date in the ticket selection

you can see it here:

https://abg-wuppertal.de/mietertreff-veranstaltungen/mittagstisch-im-februar/

the date/time is just missing here in this example but thats no problem yet 🙂


Tony

  • Support Staff

January 28, 2020 at 9:44 am

Sorry, I wasn’t really clear.

If you were to remove those dates via code, how would the code know which events to remove the dates from?

Are they all in a specific category or would you use a custom field to set a flag on each event you wanted to remove the dates from?

(You could hide the dates using CSS if you don’t want to do it via code, but you’ll need to manually add a new rule to your CSS each time you want to hide the dates on a new event that way).


dafaguru1

January 28, 2020 at 12:22 pm

ok, i’m starting to realize the complexity of my idea… 😉

so, can you tell me the CSS for hiding the date/time? then i will give it a try or otherwise I’ll ask again for the code later

THX


Tony

  • Support Staff

January 29, 2020 at 2:40 am

ok, i’m starting to realize the complexity of my idea…

It#s not actually that complex but will require work on your part to get it to work.

For example, you could use a custom field on the event, say ‘hide-datetime-output’ and set the value to true. Then use a snippet to check the event and if that custom field is set, remove the DateTime output.

So it’s not overly complicated, you just need some way of determining which events to remove the dates from. Using a custom field would mean you need to go back and update any event you want this removed from with that custom field.

so, can you tell me the CSS for hiding the date/time? then i will give it a try or otherwise I’ll ask again for the code later

Sure, hiding the datetimes can be done with CSS this like this:

#ee-event-datetimes-ul-4413 {
    display: none;
}

The selector is #ee-event-datetimes-ul-{event-id}

You can add multiple events to that section like:

#ee-event-datetimes-ul-4413,
#ee-event-datetimes-ul-1111,
#ee-event-datetimes-ul-2222 {
    display: none;
}

You can add that to Appearance -> Customize -> Additional CSS.

Viewing 5 reply threads

The support post ‘Hiding start- date/time and end- date/time for events in the headline’ 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