Support

Home Forums Event Espresso Premium Ongoing event remove date

Ongoing event remove date

Posted: May 22, 2014 at 4:42 am

Viewing 3 reply threads


blue level

May 22, 2014 at 4:42 am

hi
i want to remove the date from every ongoing events
ive seen the post about adding this to the top

<style>.start_date, .event_time, .event_address {display:none;}</style>

this is fine but i want to do the same thing but without adding this every time
you could say i want to hard code it in

what file do i edit to change what the ongoing function does


Lorenzo Orlando Caum

  • Support Staff

May 22, 2014 at 5:17 am

Hi,

You could add those CSS to a plugin like My Custom CSS. Then they will apply sitewide.


Lorenzo


blue level

May 22, 2014 at 5:38 am

but i only want it to apply when the event is set to ongoing


Josh

  • Support Staff

May 22, 2014 at 10:51 am

Hi Blue,

There are a few places where you can add a conditional so dates only display if the event isn’t ongoing. For example in event_list_display.php there’s a block of code that displays a date and optionally a add to ical button. What you can do is wrap that in a PHP conditional like this:

<?php if($status['status'] != 'ONGOING') {
	?>

<!-- date display code inside conditional -->

<?php }
?>

Another place where you might remove the date display is on the single event view. The template that handles this is registration_page_display.php. You can do something similar there too:

<?php if($is_active['status'] != 'ONGOING') {
	?>

<!-- date display code inside conditional -->

<?php }
?>

As always, we recommend making backups before changing template files. Template files can also be copied over to /wp-content/uploads/espresso/templates to prevent being overwritten on future updates. Please see this guide for more info:

If it’s in a template, these can be copied over to /wp-content/uploads/espresso/templates. There is more information in this guide: https://eventespresso.com/wiki/put-custom-templates/

Note that some templates need to be copied over in pairs. For example, if you make a change to event_list_display.php, you’ll need to copy over its counterpart event_list.php. Also please note that if we need to make a change to a template in the next version of Event Espresso, you will want to copy this change into your custom template to stay current with the plugin.

We recommend using Diffmerge to help merge changes into custom templates.

Viewing 3 reply threads

The support post ‘Ongoing event remove date’ 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