Home › Forums › Calendar Products › Events Calendar PRO › Show year in frontend for current year
- This topic has 6 replies, 2 voices, and was last updated 6 years, 2 months ago by Marcial.
-
AuthorPosts
-
January 15, 2018 at 8:26 am #1426571MarcialParticipant
Hi there
We use your shortcodes like this:
[tribe_event_inline id="1"]
{title}
{start_date} - {end_date}
[/tribe_event_inline]Is it possible to display the year of the event also for events in the current year? At the moment, it only shows the year of events that are in 2019 and not for those that are in 2018. That might cause some uncertainty for our visitors.
You can see examples here: https://www.embe.unisg.ch/refresher-fuer-embe-alumni
Thanks
January 16, 2018 at 8:24 am #1427581VictorKeymasterHi Marcial!
Thanks for getting in touch with us. I am happy to help you with this topic.
As you can see, by default it will display the dates without year when showing events for the current year. You can modify this by going to Events > Settings > Display tab and under Date Format Settings modify the “Date without year” option to suit your needs.
Is there anything else I can help you with? Let me know about it.
Best,
VictorJanuary 17, 2018 at 7:44 am #1428489MarcialParticipantHi Victor
Thanks for the hint. I didn’t tought about this option.
Now I have another question. Our events last several days, therefore the dates look like this “1. April 2019 – 6. April 2019”. Usually I would only write the year once (at the end) like this “1. April – 6. April 2019”. Is it possible to achieve this?
Thanks for your support.
Best,
MarcialJanuary 17, 2018 at 5:20 pm #1429088VictorKeymasterHi Marcial!
Thanks for following up with this.
Yes, it is possible to achieve that, but would require some custom coding.
Please let me note that we are fairly limited in how much support we can give for custom development questions like that. That said, we always like helping out and at least point users into the right direction as much possible.
You might want to check the tribe_get_end_date filter available that allows you to modify the output of the tribe_get_end_date() function located at wp-content/plugins/the-events-calendar/common/src/functions/template-tags/date.php around line 327.
I hope that helps. Let me know if any follow up questions.
Best,
VictorJanuary 24, 2018 at 8:13 am #1434677MarcialParticipantThanks Victor for helping me – problem solved.
Best,
MarcialJanuary 24, 2018 at 1:23 pm #1435090VictorKeymasterI’m happy to be of help here 🙂
Thanks for following up to let me know about it.
I’ll close this now, but feel free to open a new topic if anything comes up.
Cheers,
Victor -
AuthorPosts
- The topic ‘Show year in frontend for current year’ is closed to new replies.