Support

Home Forums Event Espresso Premium Adding text to start time & end time

Adding text to start time & end time

Posted: September 19, 2014 at 2:43 am


Joshua

September 19, 2014 at 2:43 am

I need to add text to the start & end time on registration page template.

It now only show:
Start: 12:00
End: 14:00

But it needs to be:
Start: 12:00 text
End: 14:00 text

How can I change this?

Additional info:
Wordpress version: 4.0
Event Espresso version: 3.1.36.5.P
New installation
URL: http://develop.letslunch.nl/


Dean

September 19, 2014 at 2:59 am

Hi,

The only way to achieve this would be through editing code/templates:

Option 1)

Edit the /wp-content/plugins/event-espresso/templates/registration_page_display.php file *** and change this


to this


It’s a bit messy code wise and only works if you have a single time, not multiple times.

Option 2)

Use a custom functions plugin to “plug” the event_espresso_time_dropdown() function found in /wp-content/plugins/event-espresso/includes/functions/time_date.php

Then you can modify the core function as needed, so it will work with multiple times and, honestly, will be just better code.

See pluggable functions for more information: http://codex.wordpress.org/Pluggable_Functions

*** if you copy these files:
/wp-content/plugins/event-espresso/templates/registration_page_display.php
/wp-content/plugins/event-espresso/templates/registration_page.php

over to wp-content/uploads/espresso/templates and edit them there, then updates to the plugin won’t over write your changes.


Joshua

September 19, 2014 at 4:00 am

Hi Dean,

I want to go with option 1 because we don’t use multiple times anyway. But the code below has, I think, some syntax errors I can’t figure out. Could you have another look at it?

$x= str_replace('<br> <span ',="" '="" some="" text<="" span=""><br><span ',="" $x);="" $x="str_replace('</span"><input ',="" '="" some="" different="" text<="" span=""><input ',="" $x);="" echo="" $x;="" }="" end="" time="" selected="" ?="">
</span></span>

Thanks!


Dean

September 19, 2014 at 4:46 am

Sorry, our code parser is driving me up the wall, take a look at the code here: http://pastebin.com/LCExj5dz


Joshua

September 22, 2014 at 6:58 am

Hi Dean,

Thanks for the updated code. That worked perfectly for me 🙂

Cheers!

The support post ‘Adding text to start time & end time’ 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