Support

Home Forums Events Calendar Add-on Show Event title once on calendar (no Datetimes required)

Show Event title once on calendar (no Datetimes required)

Posted: September 21, 2015 at 7:09 am


tgreen

September 21, 2015 at 7:09 am

Hi

I have one event on a single day that has 17 Datetimes. Essentially 17 time slots of 30minutes from 12:00 to 20:00. By default the calendar shows all Datetimes with Event title : Datetime.

I have worked out how to edit EE_Datetime_In_Calendar.class.php to show only the Event title for each Datetime but what I’d really like is just a single title for the whole event.

The Event list seems to work this way but I can’t work out how to amend the above class to display just the title.

Any suggestions as to where to look would be much appreciated.


Lorenzo Orlando Caum

  • Support Staff

September 21, 2015 at 10:19 am

Hi, those customizations would be lost when you update the events calendar. Could you provide a link to events calendar page?

I think you are referring to the datetimes that are shown below the description in the tooltip.


Lorenzo


tgreen

September 21, 2015 at 10:25 am

Hi

This is a test site:
http://kenningtonx.staging.wpengine.com/event-calendar/

Look at 20th September or 25th November.

I realise the changes would be overwritten but I am happy to keep on top of that if necessary.


Josh

  • Support Staff

September 21, 2015 at 6:06 pm

Hi there,

We’ll need to add at least one filter hook to the calendar to allow for modifying the query, but in the meantime, you can change the shortcode to be:

[ESPRESSO_CALENDAR max_events_per_day=1]

This will make it so it only displays the one event on the single day.


Josh

  • Support Staff

October 8, 2015 at 12:21 pm

Hi,

The filter hook has been added and it’s included in the latest calendar add-on update. There’s some example code that you can add to a functions file that will alter the query so it will display one datetime for the event in a day.

Here’s a link to that example code:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-calendar/mn_group_datetimes_by_day.php


tgreen

October 9, 2015 at 2:45 am

Fantastic, thank you I will try it out right now!


tgreen

October 12, 2015 at 6:49 am

Hi

I am getting a fatal as follows if I try the example code.

PHP Fatal error: Call to undefined function array_column() in /removed-path/wp-content/themes/genesis-sample/functions.php on line 160, referer: http://kenningtonx.staging.wpengine.com/event-calendar/


Josh

  • Support Staff

October 12, 2015 at 11:04 am

Hi there,

It turns out that array_column() is a function that was added in PHP 5.5. When you’re running a version of PHP that’s lower than 5.5, it will result in the fatal error you saw.

To fix, you either update your server to run PHP 5.5 or copy and paste this fallback function into your functions file:

https://github.com/ramsey/array_column/blob/master/src/array_column.php


tgreen

October 28, 2015 at 8:29 am

Thanks Josh

That snippet is working perfectly now we have upgraded to PHP 5.5 however it shows the time of the first EventTime not just the Event title which is a bit misleading. Is it possible to amend the snippet to only output the event title?

Thanks for your help.


Josh

  • Support Staff

October 28, 2015 at 10:00 am

In this case you would not amend the snippet. You can make the calendar only display the Title by going into the calendar’s settings and you set Show Event Time in Calendar to No.


tgreen

October 28, 2015 at 10:34 am

I’m sorry it isn’t the Event Time having looked more closely, it is the name of the Event and then the name of the first Event Datetime separated by a colon :

So it shows “Event Name : Event Datetime Name”

Is it possible to amend it to show only “Event Name”?

Thanks
Tim


Josh

  • Support Staff

October 28, 2015 at 3:22 pm

Yes, you remove the first datetime’s name in the event editor if you do not want that to be displayed. It’s an optional field.


tgreen

October 29, 2015 at 2:29 am

So simple when you know how… thank you for your patient support.
Tim


Josh

  • Support Staff

October 29, 2015 at 10:38 am

You’re welcome.

The support post ‘Show Event title once on calendar (no Datetimes required)’ 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