內容簡介
透過在頁面或文章文字中使用簡單的縮短程式碼,您可以輕鬆快速地在 WordPress 文章中加入當前日期和/或時間。只需在您的文本中使用短碼[todaysdate],當文章或頁面顯示時,[todaysdate]將會被您在設定頁面中定義的當前日期和/或時間所取代。
您也可以透過在縮短程式碼中包含格式字串,以覆寫預設格式。
舉例來說,如果您將下列文字放在您的文章中,並且您的格式字串設定為l,F jS Y
-> Thank you for visiting my site today [todaysdate]。
則會顯示如下日期:
-> Thank you for visiting my site today Wednesday, April 23rd 2014。
以下是如何透過在縮短程式碼中包含格式字串來覆寫預設設定:
[todaysdate format=”F Y”]會顯示April 2014,不論預設設定為何。
此外,此外掛 還包括了一個今日日期小工具。此小工具有其自己的預設格式,但可以透過任何有效的php日期格式字串來覆寫。
此外掛 還會使用 WordPress 的時區設定來顯示時間和日期。
外掛標籤
開發者團隊
原文外掛簡介
Simply and quickly add the current date and or time to your wordpress posts by using a simple shortcode in the text of your page or post. Simply use the short code [todaysdate] in your text and when the post or page is displayed, [todaysdate] will be replaced by the current date and/or time that you defined on the settings screen.
You can also override the default format by including the format string in the shortcode.
For example, if you placed the following text in your post and your format string was set to l, F jS Y
-> Thank you for visiting my site today [todaysdate].
The date would be displayed as
-> Thank you for visiting my site today Wednesday, April 23rd 2014.
Here how to override he default setting by including the format string in the shortcode
[todaysdate format=”F Y”] would display April 2014 no matter what the default was set to.
This plugin also includes a Today’s date widget. This widget has it’s own default format, but can be overridden by and valid php date format string
The plugin also uses the timezone settings from wordpress to display the time and date.
