
內容簡介
此外掛將新增以下短代碼至您的 WordPress 網站:
[cy] – 代表 [Current Year],會在文章中顯示出現在年份、去年年份以及明年年份,格式如下:(例如:2023)
[py] – 代表 [Previous Year],會顯示出去年的年份 (例如:2022)
[ny] – 代表 [Next Year],會顯示出明年的年份 (例如:2024)
[today] – 代表 [Today Full Date],會顯示出完整的日期、月份和年份,例如:November 09, 1994
[cd] – 代表 [Current Date],會顯示出現在的日期 (例如:27)
[day] – 代表 [day],會顯示出今天的日期 (例如:Monday)
[cm] – 代表 [Current Month],會顯示出現在的月份 (例如:December)
[nm] – 代表 [Next Month],會顯示出下個月的名字 (例如:當您使用此短代碼時,本月是十二月,則顯示出的短代碼輸出必須是一月)
[pm] – 代表 [Previous Month],會顯示出上個月的名字 (例如:當您使用此短代碼時,本月是十二月,則顯示出的短代碼輸出必須是十一月)
其他短代碼
* [fcr] – 代表 [Full Copyrights],會輸出具有 (All Rights Reserved) 文字的頁腳版權
* [copy] – 代表 [Just Copyrights Symbol],如果使用者要在掛件的任何位置顯示©標誌,則會輸出該符號
* [st] – 代表 [Site Title],會將網站 URL 輸出為網站名稱錨定
* [post_modified] – 這會輸出文章或頁面的更新日期,該短代碼需放置於文章或頁面上。
* [age dob=”mm/dd/yyyy”] 您可以使用此代碼,在 WordPress 內容中使用 [age dob=”11/09/1994″] 代碼,以輸出基於所提供的出生日期的當前年齡。
* 請注意,請務必將「11/09/1994」替換為您要使用的實際出生日期。
* [aadmy_event date=”mm/dd/yyyy”] 可以使用數個年份。如 [aadmy_event date=”04/12/2021″] 會顯示出1年、9個月和8天前
在 php 中呼叫短代碼
* 請使用以下方法:echo do_shortcode(‘[shortcode_name]’);
相容性
* 此插件與 WordPress 版本 4.7 及更高版本以及任何 WordPress 主題兼容。
完整指南
如需更多信息和使用示例,請造訪我們的插件頁面。
外掛標籤
開發者團隊
② 後台搜尋「AADMY – Add Auto Date Month Year Into Posts」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
**Test AADMY Before You Install! **
Want to see how this plugin works before installing it on your site?
Try this plugin on our dummy site to explore its features and functionality in a live environment.
This WordPress plugin allows you to dynamically add current dates, years, months, and other time-related elements to your content. It helps to keep your content up-to-date and improve your SEO thus ensuring that your website’s content is always fresh and relevant. With this plugin, you can easily add dynamic current time elements to your website without any coding knowledge.
This plugin adds the following short codes to your WordPress Blog/Site:
[cy] – Stands For [Current Year] This would output the current year, the previous year, and the next year in the post, like this: (e.g. 2024)
[py] – Stands For [Previous Year] Outputs the previous year (e.g. 2023)
[ny] – Stands For [Next Year] Outputs the next year (e.g. 2025)
[today] – Stands For [Today Full Date] Outputs the Full Date, month and year (e.g. November 09, 1994)
[tomorrow] Stands For Next Day Full Date e.g, (Today is April 16, 2024 it will show the April 17, 2024 using simple shortcode [tomorrow])
[cd] – Stands For [Current Date] Outputs the Current Day (e.g. 27)
[pd] – Stands For [Previous day] Outputs the Previous Day (e.g. Thursday)
[day] – Stands For [day] Outputs the Current Day (e.g. Friday)
[nd] – Stands For [Next day] Outputs the Previous Day (e.g. Saturday)
[cm] – Stands For [Current Month] Outputs the Current Month (e.g. December)
[nm] – Stands For [Next Month] Outputs the name of next month (e.g. This month is December when you use given shortcode output must be January)
[pm] – Stands For [Previous Month] Outputs the name of previous month (e.g. This month is December when you use given shortcode output must be November)
[offset]
This shortcode will display a previous or future date based on an offset from the current date. Usage: [offset date=”OFFSET”], where “OFFSET” is an integer representing the number of days before (-) or after (+) the current date. Examples:
[offset date=”-1″] will display the previous date based on the user’s timezone. Example output: “May 4, 2023”.
[offset date=”0″] is equivalent to [today] and will display the current date. Example output: “May 5, 2023”.
[offset date=”1″] will display the next date based on the user’s timezone. Example output: “May 6, 2023”.
[offset date=”365″] will display the date one year from the current date based on the user’s timezone. Example output: “May 5, 2024”.
Countdown short and Countdown
These shortcodes will display a live countdown to a specified date, either in a compact or detailed format, based on the shortcode used. The countdowns will update in real-time, showing the remaining time until the target date provided by the user.
Usage:
[cdown_short date=”mm/dd/yyyy”]: Displays the countdown in a short format (e.g., “84d, 7h, 26m, 38s”).
[countdown date=”mm/dd/yyyy”]: Displays the countdown in a full format (e.g., “84 days, 7 hours, 26 minutes, 38 seconds”).
Examples:
[cdown_short date=”12/31/2024″]: Shows the time remaining until December 31, 2024, in a short format: “84d, 7h, 26m, 38s”.
[countdown date=”12/31/2024″]: Shows the time remaining until December 31, 2024, in a detailed format: “84 days, 7 hours, 26 minutes, 38 seconds”.
[cdown_short date=”06/01/2025″]: Displays the time left until June 1, 2025, in a short format.
[countdown date=”06/01/2025″]: Displays the time left until June 1, 2025, in a detailed format.
Shortcodes to display live countdowns in a short or detailed format, depending on user input.
[custom_countdown_short hours=”value”]: Countdown in a compact format (e.g., 2d, 5h, 30m, 45s).
[custom_countdown_full hours=”value”]: Countdown in a full format (e.g., 2 days, 5 hours, 30 minutes, 45 seconds).
Examples:
[custom_countdown_short hours=”48″]: Displays 2d, 0h, 0m, 0s.
[custom_countdown_full hours=”12″]: Displays 0 days, 12 hours, 0 minutes, 0 seconds.
Note that the date format is “F j, Y” (e.g. “May 5, 2023”). You can modify this format by editing the show_previous_dates() function in the functions.php file.
Other Shortcodes
[fcr] – Stands For [Full Copyrights] Outputs the Footer Copyrights with (All Rights Reserved) text.
[cs] – Stands For [Just Copyrights Symbol] Outputs the © Symbol if user want show this symbol anywhere in where installed this plugin
[st] – Stands For [Site Title] Outputs the Site URL with anchoring the Site Name
[post_modified]: Use this shortcode to display the updated date of a post or page. It will show the date in the format “Month Day, Year” (e.g., May 27, 2023).
[post_mdt]: Use this shortcode to display the updated date and time of a post or page. It will show the date in the format “Month Day, Year” and the time in a 12-hour format with AM/PM (e.g., May 27, 2023 at 3:21 PM).
[age dob=”mm/dd/yyyy”] With this code, you can use the shortcode [age dob=”11/09/1994″] in your WordPress content to output the current age based on the provided date of birth.
Note: Make sure to replace ’11/09/1994′ with the actual date of birth that you want to use.
[aadmy_event date=”mm/dd/yyyy”] A numbers of years can be referred to using this short code. like [aadmy_event date=”04/12/2021″] outputs the 1 years, 9 months, and 8 days ago
Setting Shortcodes for Copy
[copy name=”copy1″ value=”AADMY Auto Plugin”] (You can set your own value within the name=” “ attribute. i used copy1)
Pasting the Copy shortcode value Here
[paste name=”copy1″]
Similarly, you can create and use additional copy and paste shortcodes with unique names to store and retrieve other values as needed.
This code is showing you how to create shortcodes for copying and pasting specific values.
To set a value to be copied, you would use the shortcode [copy] and include a name and value attribute, like this: [copy name=”copy1″ value=”AADMY Auto Plugin”]
Then, when you want to paste that value somewhere else, you would use the shortcode [paste] and include the name attribute, like this: [paste name=”copy1″]
You can create and use additional copy and paste shortcodes with unique names to store and retrieve other values as needed.
Call Shortcodes with PHP
* Use this: echo do_shortcode(‘[shortcode_name]’);
Compatibility
This plugin is compatible with WordPress versions 6.0 and higher, as well as with any WordPress theme.
Full Guide
For more information and usage examples, you can visit our plugin page.
If you have a problem with our plugin or have any questions, you can contact our support team by emailing [email protected] or by visiting our support forum. We will do our best to assist you and resolve any issues you may have.
