Posted: July 6, 2015 at 2:10 pm
|
I’ve been searching for a bit and I cannot figure this out. Eg: 7:30am – 5:00pm Thank you in advanced. |
Hi Judy, the function that shows the date times is pluggable so it can be changed. The example in this link will show only the time without the dates: https://gist.github.com/lorenzocaum/41f70b94f7c6b212b145 — |
|
|
Thanks so much for your response, Greatly appreciated! |
|
I should mention to that I am only looking to display this information in one spot, so globally showing only the start/date time wouldn’t be ideal. This is just being shown in one spot in my template. ๐ |
|
An example of what I am trying to acomplish I will also be looking to do the same with the base price of the event or in my case the “class”. Is there any reference/docs available for displaying different fields like this to build a template? Thanks again ๐ |
Hi Judy, the template file that shows the datetimes on the single event page is the same as the one that is used on the event listings page so a change in one area will apply to the other. espresso_list_of_event_dates is not used in other areas such as the registration checkout page or your WP dashboard. — |
|
|
okay, thanks. |
Your image was helpful. Please see this resource for information on how the templates work together: https://gist.github.com/0a35fe4997992fdb1dc5 You can use some CSS to make the datetimes appear inline: https://gist.github.com/lorenzocaum/239b4237bd6b2b52be7a The function that shows the datetimes is called espresso_list_of_event_dates. — |
|
|
Thanks, However it is outputting the html with it and an icon, how can I just output the time without any other formatting or html attached to it? |
|
Sorry I just noticed it is also outputting Other information with it, how do I just echo the start time and end time with no html or anything else? |
Alright, could you please try this instead: ID ); ?> It should appear like this without the icons: http://cl.ly/image/451D2A2I0K3J — |
|
|
PERFECT! And, is there any docs or resources I could reference in the future to output information into my template like this? Thank you so so so much! |
Yes, we have an example of that available. See this file: http://cl.ly/code/0F1R253u161u The PHP code snippet between the div for event pricing will show the pricing in this format: $99 — |
|
|
Thanks, that also worked perfectly. |
|
Hi Judy, Is this issue resolved now? |
The support post ‘EE4 – Echo Start Time – End Time in Php on custom single page template.’ 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.