Hello
In FES my visitors can write the end of the event. Where is that suppose to appear live?
Right now only the start of the event is coming up live.
What to do?
/Anna
Handelsplats Norsjö
At present Event Organiser only displays start dates – this will change in 3.0.0 when it will display events as a range.
Until Event Organiser 3.0.0 is released you can edit event-meta-single-event.php to include the end date. Please see these threads for examples:
Stephen Harris
Hello, thank´s. In these examples you refer to http://www.harriswebsolutions.co.uk, and those links does not work. I make it work in single events with:
<!-- Single event -->
<?php _e('Start', 'eventorganiser') ;?>: <?php eo_the_start($date_format); ?>
End:<?php eo_the_end( $date_format ); ?>
But then the word “End” is not translated. How do I do this? And how do I show it in archive? Anna
Handelsplats Norsjö
The end text isn’t translated because it’s hardcoded. Even if you used the _e
function there might not be a translation available for it.
Could you just use the translated text rather than English?
The other templates can be found in /event-organiser/templates (see http://docs.wp-event-organiser.com/theme-integration/
The codex linked to in the threads above can be found at http://www.codex.wp-event-organiser.com/
Stephen Harris
Hello
I do not understand what you mean because I am not comfortable with code/codex. I dont know what _e funktion is.
I dont know what you mean with “Could you just use the translated text rather than English?” What translated text?
Sorry for this but I need “step-by-step”. Or do you have any explanation how to do with the codex?
Anna
Handelsplats Norsjö
Hi Anna,
“Could you just use the translated text rather than English?” What translated text
So to recap – the snippet you added shows the event end date, but the text next to it appears as ‘End’ and you wanted that text to translated to something else? I’m guessing Swedish based on the site, and google translate tells me that you might want “Slutdatum” instead of “End”.
In which case, simply replace “End:” in the above snippet with “Slutdatum:”.
Using run-time translation (which is what _e( 'End:', 'eventorganiser' )
would effectively do) is needlessly convulted and complicated if you simply need the Swedish for ‘End:’.
So I would suggest just is replacing:
<!-- Single event -->
<li><strong><?php _e('Start', 'eventorganiser') ;?>:</strong> <?php eo_the_start($date_format); ?> </li>
with
<!-- Single event -->
<li><strong>Startdatum: <?php eo_the_start($date_format); ?></strong></li>
<li><strong>Slutdatum: <?php eo_the_end( $date_format ); ?></strong></li>
(apologies for any incorrect Swedish translations!)
Stephen Harris
Thank you very very much!
This works good and I´m very pleased!
/Anna
Handelsplats Norsjö