Support

Home Forums Event Espresso Premium How To Display Date Of Event Next To Event Title

How To Display Date Of Event Next To Event Title

Posted: August 4, 2021 at 4:16 pm

Viewing 10 reply threads


David Goldstein

August 4, 2021 at 4:16 pm

I am trying to figure out how to display the date of the event next to its title on the all events view. I’ve seen older documentation that doesn’t seem to be quite a fit. My site is running ee 4.10.13.p and wp 5.8.

Thank you


Tony

  • Support Staff

August 5, 2021 at 1:21 pm

Hi there,

Can you link me to the page you are referring to please?

Or add a screenshot of it: https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

A lot of the front end output depends on your theme and the admin view depends on the specific location so I’ll need more details so I don’t send you down the wrong path for this ๐Ÿ™‚


Hazel Apuhin

August 6, 2021 at 5:02 pm

Hi,

I hope all is well.

I just wanted to bump this up your messages. Were you able to figure it out yourself? If you need anything please let us know.


David Goldstein

August 8, 2021 at 7:23 am

Apologies, I was not getting emails when the thread was updated and decided to check it manually. The page I am troubleshooting on is
http://thegarrisonian.info/doc/all-upcoming-seminars/

Thank you


Tony

  • Support Staff

August 9, 2021 at 9:26 am

Hi David,

Looks like you are using the Upcoming Events widget to display those events, we don’t have an option to display the date next to the title there but you can customize the output of the widget if you are comfortable with PHP?

Can you show an example of what you are trying to do with the output? Maybe a screenshot of what you are looking to achieve?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots


David Goldstein

August 9, 2021 at 4:10 pm

I simply want to display the event with the following mask (or something similar):
<EVENT_TITLE>,<EVENT_START>-<EVENT_END>.

My PHP is rusty but I’m sure I can muddle through if you have a link to some examples. What is the best way to make these customizations so that they will be available after updates?

Thanks


Tony

  • Support Staff

August 10, 2021 at 4:12 pm

As you are using the widget to output the events you can basically create a copy of the current widget in its own plugin and edit the contents of that plugin, then just use that widget in place of EE’s default one.

We have an example of doing that here:

https://gist.github.com/joshfeck/27a285c4285a6c986053

The output for the event details starts on line 354.

From the above it sounds like you’ll need something like:

echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a' . $len_class . '" href="' . $event_url . '">' . $event->name() . '</a>' . ', ' . espresso_event_date_range('', '', '', '', $event->ID(), false) . '</h5>';

With THIS block removed or commented out.


David Goldstein

August 11, 2021 at 5:13 am

Thanks! This looks like it should do the trick. I will post back with my results.


Tony

  • Support Staff

August 11, 2021 at 6:40 am

You’re most welcome.


David Goldstein

August 17, 2021 at 10:20 am

Apologies for the delay, I’m on holiday until next week and will post results once I’ve gotten the chance.

Thanks again!


Tony

  • Support Staff

August 17, 2021 at 2:13 pm

No problem, enjoy your holiday ๐Ÿ™‚

Viewing 10 reply threads

The support post ‘How To Display Date Of Event Next To Event Title’ 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