[WordPress] 外掛分享: This Day In History

首頁外掛目錄 › This Day In History
WordPress 外掛 This Day In History 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
1,000+
安裝啟用
★★★★
4.5/5 分(24 則評價)
1093 天前
最後更新
0%
問題解決
WordPress 4.4+ v3.10.1 上架:2012-01-09

內容簡介

這個外掛可以讓您輸入和管理不同種類的事件,然後透過小工具或 shortcode 進行顯示。

Shortcodes

這裡有兩個 shortcode。 [tdih] 會以小工具方式列出,[tdih_tab] 則會以表格方式列出。

tdih

您可以在任何文章或頁面中加入 [tdih] shortcode 以列出事件清單。

這個 shortcode 有十一個可選屬性:

show_age (0, 1) – 1 會在標題後以括號顯示該事件的年齡,0 則否(預設)。
show_link (0-2) – 0 會顯示「連結」以顯示更多資訊(預設),1 會在連結標題後顯示更多資訊,2 則是一直連結標題。
show_type (0, 1) – 1 顯示事件類型(預設),0 則否。

show_year (0, 1) – 1 顯示事件年份(預設),0 則否。

type – 輸入類型以僅顯示該類型的事件。預設會顯示所有類型。

day (1-31) – 輸入日期以僅顯示當日事件。預設會顯示所有日期。
month (1-12, c) – 輸入月份以僅顯示該月份的事件。預設會顯示所有月份。
year (-9999 to 9999, 0) – 輸入年份以僅顯示該年份的事件。預設會顯示所有年份。
period (t, m, y) – 顯示今天、明天和昨天的事件。預設會顯示今天的事件。
classes – 輸入一個或多個空格分隔的類別,將會添加到該表格標籤中。
max_rows (1-99) – 輸入要顯示的事件數量上限。預設會顯示所有事件。

範例用法:

[tdih] – 這會顯示今天所有事件的年份和事件類型。
[tdih show_type=0 type='birth'] – 這會顯示適用於事件類型(slug)為 birth 的年份和事件,但不會顯示該事件的類型。
[tdih year=1066 max_rows=5] – 這會顯示 1066 年當天的最多五件事件的年份和事件類型。

tdih_tab

您可以在任何文章或頁面中加入 [tdih_tab]shortcode 以顯示事件表格。

這個 shortcode 有十四個可選屬性:

show_date (0, 1) – 1 會顯示日期(預設),0 則否。
show_dow (0, 1) – 1 會顯示星期幾,0 則否(預設)。
show_head (0, 1) – 1 會顯示標題列(預設),0 則否。
show_link (0, 1, 2) – 0 會顯示「連結」以顯示更多資訊,1 會在連結標題後顯示更多資訊,2 則是一直連結標題。

show_type (0, 1) – 1 顯示事件類型(預設),0 則否。

order_dmy (0, 1) – 0 按照年-月-日的方式排序(預設),1 按照日-月-年的方式排序。

type – 輸入類型以僅顯示該類型的事件。預設會顯示所有類型。
day (1-31) – 輸入日期以僅顯示當日事件。預設會顯示所有日期。
month (1-12, c) – 輸入月份以僅顯示該月份的事件。預設會顯示所有月份。
year (-9999 to 9999, 0) – 輸入年份以僅顯示該年份的事件。預設會顯示所有年份。
period (a, c, l, m, n, t, w, y) – t、m、y 會顯示今天、明天和昨天的事件。c、l、n、w 會顯示當前、上一個、下一個和 ISO 週的事件。a 會顯示所有事件。預設會顯示今天的事件。
period_days (1-99) – 輸入要顯示的天數以供 t、m、y 週期使用。

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.10.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「This Day In History」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin allows you to enter and manage different kinds of events that you then display in via a widget or shortcodes.
Shortcodes
There are two shortcodes. [tdih] shows output as a list similar to the widget and [tdih_tab] shows output as a table.
tdih
You can add a [tdih] shortcode to any post or page to display a list of events as per the widget.
There are eleven optional attributes for this shortcode

show_age (0, 1) – 1 shows the age in years of the event in brackets after the title and 0 does not (default).
show_link (0-2) – 0 shows a more link if there is more to show (default), 1 links the title if there is more to show and 2 always links the title.
show_type (0, 1) – 1 shows event types (default) and 0 does not.

show_year (0, 1) – 1 shows the year of the event (default) and 0 does not.

type – enter a type to show only events of that type. Shows all types by default.

day (1-31) – enter a day to show only events on that day. Shows all days by default.
month (1-12, c) – enter a month to show only events in that month. Shows all months by default.
year (-9999 to 9999, 0) – enter a year to show only events in that year. Shows all years by default.
period (t, m, y) – show events for today, tomorrow and yesterday. Shows today’s events by default.
classes – enter one or more space separated classes which will be added to the table tag.
max_rows (1-99) – enter a maximum number of events to show. Shows all events by default.

Example use:

[tdih] – This shows year and event types for all event types for today’s events.
[tdih show_type=0 type='birth'] – This shows year and event but not type for the event type (slug) of birth.
[tdih year=1066 max_rows=5] – This shows year and event types for up to five events that happened on this day in 1066.

tdih_tab
You can add a [tdih_tab] shortcode to any post or page to display a table of events.
There are fourteen optional attributes for this shortcode:

show_date (0, 1) – 1 shows the date (default) and 0 does not.
show_dow (0, 1) – 1 shows the day of the week and 0 does not (default).
show_head (0, 1) – 1 shows a header row (default) and 0 does not.
show_link (0, 1, 2) – 0 shows a more link if there is more to show, 1 links the title if there is more to show and 2 always links the title.

show_type (0, 1) – 1 shows event types (default) and 0 does not.

order_dmy (0, 1) – 0 sorts chronologically by year-month-day (default) and 1 sorts by day-month-year.

type – enter a type to show only events of that type. Shows all types by default.
day (1-31) – enter a day to show only events on that day. Shows all days by default.
month (1-12, c) – enter a month to show only events in that month. Shows all months by default.
year (-9999 to 9999, 0) – enter a year to show only events in that year. Shows all years by default.
period (a, c, l, m, n, t, w, y) – t, m, y show events for today, tomorrow and yesterday. c, l, n, w show events for current, last, next and ISO week. a show all events. Shows today’s events by default.
period_days (1-99) – enter the number of days to show for t, m, y periods only. Shows only one day by default.
date_format – enter a custom php date format to display the date. Uses the tdih admin setting by default.
classes – enter one or more space separated classes which will be added to the table tag.

NB:

day of the week will never be shown if the date is not shown.
Setting date_format will override the tdih admin format and the day of the week setting.
Setting period will override any values for day, month and year.
day, month and year can be combined.
year=0 will display events with no year
month=c will display the current month
period=c, l or n show a seven day period with the current day as the middle, last or first day.

Example use:

[tdih_tab period='a'] – This shows a full list of events in date order and includes the event type.
[tdih_tab show_types=0 type='birth' classes='content dark'] – This shows events but not type for the event type (slug) of birth. ” content dark” will be added to the table’s class.
[tdih_tab day=20 month=8 date_format='Y'] – This shows events on 20th August in any year. Format the date to only show the four digit year.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon