Show year in frontend for current year

Home Forums Calendar Products Events Calendar PRO Show year in frontend for current year

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1426571
    Marcial
    Participant

    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

    #1427581
    Victor
    Member

    Hi 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,
    Victor

    #1428489
    Marcial
    Participant

    Hi 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,
    Marcial

    #1429088
    Victor
    Member

    Hi 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,
    Victor

    #1434677
    Marcial
    Participant

    Thanks Victor for helping me – problem solved.

    Best,
    Marcial

    #1435090
    Victor
    Member

    I’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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Show year in frontend for current year’ is closed to new replies.