Support

Home Forums Event Espresso Premium Add Event Date to appear with Event Title on Event Registration Page, Event Page

Add Event Date to appear with Event Title on Event Registration Page, Event Page

Posted: January 6, 2015 at 12:29 pm

Viewing 6 reply threads


Daniel Samsel

January 6, 2015 at 12:29 pm

I reviewed this thread:
https://eventespresso.com/topic/adding-a-date-to-the-title-of-an-event_list-page/

I updated the page, but all I see in place of the date is the added code.
– < ?php echo $event_date_display($start_date, get_option(‘date_format’) ?>

Has there been an update since this thread, that is causing this issue?

Any help on achieving this task would be great.

I am using EE 3.1.36.6.P on WordPress 4.1.

Thank you.


Lorenzo Orlando Caum

  • Support Staff

January 6, 2015 at 12:52 pm

Hi Daniel,

Did you first move those two templates over?

Next, the sample code scrolls towards the left. That is there is more code that what is visible. Could you double-check that you referenced the entire sample code here:

https://eventespresso.com/topic/adding-a-date-to-the-title-of-an-event_list-page/#post-118237


Lorenzo


Daniel Samsel

January 6, 2015 at 1:47 pm

Lorenzo,

I reviewed the code, found in your forum, in more detail. Compared it to my Event_list_display.php file and corrected a few places.

All is working fine, but how do I get the date to appear next to the Title of the Event on Event’s Page itself?
http://hopeforbeauty.com/hope/event-registration/?ee=8
The date you see (1/25/2014) is manually inputted as part of the event title.

I would like the date to appear automatically as I have just accomplished with the Event Registration Page.

Thanks again for your help and very quick response.


Lorenzo Orlando Caum

  • Support Staff

January 6, 2015 at 2:13 pm

Hi Daniel, event_list.php & event_list_display.php are for the event listing page.

You would need to make a similar edit to the single event page which uses these templates:

registration_page_display.php & registration_page.php

Be sure not to edit the core plugin files, but instead copy them over as you did for event_list.php & event_list_display.php. Then apply the edit to the title in registration_page_display.php and save changes.


Lorenzo


Daniel Samsel

January 7, 2015 at 12:35 pm

Lorenzo,
I have transfer the registration_page.php and the registration_page_display.php to the Uploads>Espress>Templates Folder.

In the registration_page_display.php I believe it is line 6 is what I need to modify from:
THIS
<div id=”espresso-event-id-<?php echo $event_id; ?>

TO THIS
<div id=”espresso-event-id-<?php echo $event_id; ?> – <?php echo event_date_display($start_date, get_option(‘date_format’)) ?>”>

Am I correct?

I’m not very good with PHP.

Thank you for your guidance.


Lorenzo Orlando Caum

  • Support Staff

January 7, 2015 at 12:56 pm

Hi Daniel,

You were close on the the edit. An event ID is a numeric value such as 123. You are looking for the event title (event name).

At about line 14 in registration_page_display.php, you’ll see this:


Change it to this:

 - 

Here is the end result for the expanded code block which is wrapped in an H3 heading:

- Event Expired' : ''; ?> Event is Pending' : ''; ?> Event is a Draft' : ''; ?>

Note: there is no extra spacing in the opening PHP. I’ll move this to a Gist on Github:

https://gist.github.com/lorenzocaum/eee8c7d4a00051de8c37


Lorenzo


Daniel Samsel

January 7, 2015 at 1:03 pm

That did it.

Looks fantastic.

Thank you again for your help and quick responses.
Great Product.

Viewing 6 reply threads

The support post ‘Add Event Date to appear with Event Title on Event Registration Page, Event Page’ 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