• Resolved datsyuk

    (@datsyuk)


    Hello there,

    I’m just trying out My Calendar and almost everything works fine.
    The only problem is that the Shortcode {date} shows “time, date”:
    The shortcode {time} only shows the time.
    I searched a lot, but I did not find a solution to show the date wirhout the time.
    How can I fix that?

    Thanks
    J?rg

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    The {date} template tag will show the results of the date format you have saved, which can include the time. There are two places it could draw that format from: either the settings at My Calendar > Settings > Text for date format, or if that field is blank, it’ll draw from your general date format settings at WordPress > Settings > General.

    What are the values in those fields?

    Thread Starter datsyuk

    (@datsyuk)

    Hello,

    thanks for your reply. The field in My Calendar > Settings > Text is blank.
    The WordPress > Settings > General is checked to j. F Y and time to G:i

    I found out that the {time} Shortcode only works if I enter a time format in My Calendar > Settings > Text. Right now the time format is set to H:i
    If I leave the field empty, the {time} does not show anything, but if I enter a format in the time field the {date} Shortcode shows “time, date”.
    Any ideas? Can i reset the plugin to initial settings?

    Regards
    YUK

    Plugin Author Joe Dolson

    (@joedolson)

    Where are you using the {date} tag that’s having this result?

    Thread Starter datsyuk

    (@datsyuk)

    In the upcoming events widget

    The shortcode is:
    {timerange after=”, “}{date} – {linking_title}

    The output is e.g.:
    09:00, 16. Januar 2021 – Sample Event

    regards
    YUK

    Thread Starter datsyuk

    (@datsyuk)

    Btw. the problem does not appear if I create a shortcode with the shortcode Generator but unfortunately {link_title} does not work with the code from the generator. The event title is not clickable.

    Plugin Author Joe Dolson

    (@joedolson)

    {link_title} and {linking_title} are two different template tags; linking_title will always provide a link, link_title will only provide a link if you add one, and will not fall back to the normal event page.

    Based on the template you shared, I suggest removing {timerange after=", "} so that the time will not be shown.

    Thread Starter datsyuk

    (@datsyuk)

    thank you. that worked fine!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show date without time’ is closed to new replies.