[WordPress] 外掛分享: PCF Christmas Countdown

首頁外掛目錄 › PCF Christmas Countdown
WordPress 外掛 PCF Christmas Countdown 的封面圖片
10+
安裝啟用
★★★☆☆
3/5 分(1 則評價)
3818 天前
最後更新
問題解決
WordPress 4.0+ v2.2 上架:2015-09-06

內容簡介

基本指示

這個外掛可以立即使用,安裝好後,您可以把簡碼放在任何位置。

使用簡碼 [pcf_xmas_countdown] 以輸出倒數計時。

預設輸出單位為日 (例如: '‘距離聖誕節還剩下 105 天!')

更改輸出單位

簡碼可以加上 ‘type’ 參數,如下所示:

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

這樣可以改變輸出單位。

您可以選擇以下 3 個輸出單位:



夜晚

如果您沒有指定 type 參數,或是設定之內容無效,它將預設為 ‘日’。

例如:

[pcf_xmas_countdown type="weeks"]

輸出內容日為:

距離聖誕節還剩下 `x` 週與 `y` 天!

設定輸出樣式

輸出樣式是進階設定,需要使用自訂的 CSS 樣式。

您可以加上 ‘id’ 參數,這樣就可以使用 CSS 語法設計輸出樣式。

例如:

[pcf_xmas_countdown id="my-id"]

HTML中相對應的內容為:

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

然後您就可以在 外觀 > 編輯器 中加上自訂 CSS,如果您的佈景主題支援自訂 CSS,也可以在佈景主題選項中加上樣式。如果編輯器中有一個自定義的 CSS 檔案,建議使用它來添加自訂樣式。

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

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

這樣就可以設定輸出內容為紅色,有下劃線,且字體大小為16px。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Basic Instructions
This plugin works out-of-the-box, so once the plugin is installed, you can place a shortcode wherever you want.
Use the shortcode [pcf_xmas_countdown] to output the countdown.
The countdown will output in days by default (e.g ‘105 days until Christmas!’).
Changing output type
The shortcode can be given a ‘type’ attribute, like so:
[pcf_xmas_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_xmas_countdown type="weeks"]

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

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_xmas_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: red;
font-size: 16px;
text-decoration: underline;
}

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

延伸相關外掛

文章
Filter
Apply Filters
Mastodon