Support

Home Forums Event Espresso Premium Remove date and time on specific taxonomy?

Remove date and time on specific taxonomy?

Posted: October 14, 2021 at 4:26 pm


BCPTA

October 14, 2021 at 4:26 pm

Hello,

We are wondering if there is a way to remove the date and time on events for a specific event category, tag or other taxonomy?

I’m wondering if this is possible without using a custom template? I did see this (we are on Genesis): https://eventespresso.com/wiki/build-custom-espresso-event-post-templates-genesis/

I was able to use the following code on the archive of the event category to remove date and time:

.term-27 .dashicons, .term-27 .ee-event-datetimes-li-daterange, .term-27 .ee-event-datetimes-li-timerange {
display:none;}

https://www.bcplaytherapy.ca/event-category/elearning-library/

However, if I go to the single event page, the “term-27” is no longer a body class. https://www.bcplaytherapy.ca/events/elearning-library-attachment-centered-play-therapy-with-clair-mellenthin/

Also, Genesis normally provides the option to add a body class to a post, but I don’t see it anywhere in the Event editing page. Is there a way to bring it ‘back’ there? If we could just add the body class of “term-27” (or whatever) to that page, then we could use display:none to deal with this easily.

I’m not sure if date and time shows up anywhere else for users, but we would need it removed in those cases too.

The background:

We are using your plugin to take payments for online courses (connected to LearnDash). The only way we can do this is to set the date far into the future, as discussed here: https://eventespresso.com/topic/ongoing-event-with-no-expiry/

But in reality, the course ACCESS expires one year after purchase. So this is a bit confusing.

At the same time, we still sell event tickets for in-person events, so we can’t remove the date and time for all categories. We want it to apply to just one category or tag where we are listing our online, never-ending events.

Thank you.


BCPTA

October 14, 2021 at 4:27 pm

Also if we change the template it will apply to all the events, no? We need it to apply to just the category, even if we do use a template.


Tony

  • Support Staff

October 15, 2021 at 4:22 am

Hi there,

You can add the terms to the espresso_event body class using a snippet like this:

https://gist.github.com/Pebblo/6ba85a263e9f9d67d70b1febbe0e6aa9

If you change Line 14 to be:

$classes[] = 'term-' . $custom_term->term_id;

It will output term-27 as a class and therefore should use the same CSS you already have applied.

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso