[WordPress] 外掛分享: PCF Birthday Countdown

首頁外掛目錄 › PCF Birthday Countdown
WordPress 外掛 PCF Birthday Countdown 的封面圖片
10+
安裝啟用
尚無評分
3817 天前
最後更新
問題解決
WordPress 4.0+ v2.2 上架:2015-09-10

內容簡介

基本指示

安裝外掛後,前往設定 > 一般 > PCF Countdown 選項,輸入倒數計時的名稱和日期。

使用縮略語 [pcf_bday_countdown] 產生倒數計時。

預設輸出的倒數計時是以天計算(例如:「105 天後,名字的生日」)。

更改輸出類型

縮略語可以加入一個「類型」屬性,如下所示:

[pcf_bday_countdown type="days|weeks|sleeps"]

這樣可以讓你更改輸出類型。

有 3 種類型供選擇:

以天為單位
以星期為單位
以睡眠時間為單位

如果您沒有指定類型屬性或指定無效類型,它將預設為「天」。

例如:

[pcf_bday_countdown type="weeks"]

輸出為

距離名字的生日還有 `x` 週和 `y` 天!

設計輸出

設計輸出是一項高級設置,需要編寫自定義 CSS。

縮略語可以加入一個「id」屬性,以便使用 CSS 設計輸出。

例如:

[pcf_bday_countdown id="my-id"]

輸出的 HTML 將會為

<p id="my-id">...</p>

然後,您可以透過 外觀 > 編輯器 添加自定義 CSS。如果您的佈景主題支援自定義 CSS,您可以在佈景主題選項中添加您的樣式。如果在編輯器中有自定義 css 檔案,建議使用該檔案進行自定義樣式。

以下是一些自定義樣式的範例:

#my-id{
color: blue;
font-size: 16px;
text-decoration: underline;
}

這將設置輸出為藍色、帶有下劃線,並且字體大小為 16px。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.2) 或搜尋安裝

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

原文外掛簡介

Basic Instructions
Once the plugin is installed, go to Settings > General > PCF Countdown Options to input a name and date for the countdown.
Use the shortcode [pcf_bday_countdown] to output the countdown.
The countdown will output in days by default (e.g ‘105 days until names Birthday’).
Changing output type
The shortcode can be given a ‘type’ attribute, like so:
[pcf_bday_countdown type="days|weeks|sleeps"]

This enables you to change the output type.
There are 3 types to choose from:

Days
Weeks
Sleeps

If you do not specify the type attribute, or specify an invalid type, it will default to ‘days’.
Example:
[pcf_bday_countdown type="weeks"]

will output as
It's `x` weeks and `y` days until `name`s Birthday!

Styling the output
Styling the output is an advanced setting, that involves writing custom CSS.
The shortcode can be given an ‘id’ attribute, which can then be used to style the output using CSS.
For example,
[pcf_bday_countdown id="my-id"]

would output in HTML as

...

You can then add custom CSS through Appearance > Editor. If your theme supports custom CSS, you may be able to add your styles in Theme Options. If there is a custom css file in Editor, it is advised to use that for custom styles.
Here is an example of some custom styles:
#my-id{
color: blue;
font-size: 16px;
text-decoration: underline;
}

This will set the output to be blue, underlined, and to have a font size of 16px.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon