Posted: May 22, 2014 at 4:42 am
|
hi
this is fine but i want to do the same thing but without adding this every time what file do i edit to change what the ongoing function does |
Hi, You could add those CSS to a plugin like My Custom CSS. Then they will apply sitewide. — |
|
|
but i only want it to apply when the event is set to ongoing |
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. |
|
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.