前言介紹
- 這款 WordPress 外掛「Bloginfo Shortcode」是 2013-09-24 上架。
- 目前有 1000 個安裝啟用數。
- 上一次更新是 2013-09-25,距離現在已有 4240 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
ethanpil |
外掛標籤
內容簡介
這個外掛增加了一個 shortcode [blog],可以提取和 bloginfo() 函式一樣的相關訊息。使用它非常簡單,並支援與 bloginfo() 一樣的取值。
為什麼使用 shortcode 而不是 PHP 的函式?有時候我需要實現稍微不同的相同網站。這讓我能夠像需要更改的地方一樣在文章內容中傳播這些值,而不用記住每個需要更改的地方。
它的使用方式如下:
[blog info="name"]
這等同於 PHP 中的以下代碼:
bloginfo('name');
這裡有一些示例用法:
[blog info="name"] - 顯示在「設定 > 一般」中設置的「站點標題」。
[blog info="description"] - 顯示在「設定 > 一般」中設置的「標語」。
[blog info="wpurl"] - 顯示在「設定 > 一般」中設置的「WordPress網址」。
[blog info="url"] - 顯示在「設定 > 一般」中設置的「網站地址」。
[blog info="admin_email"] - 顯示在「設定 > 一般」中設置的「電子郵件地址」。
查看這裡以獲取所有可使用的參數:https://codex.wordpress.org/Function_Reference/bloginfo
在這裡另外再啟動一個版本:https://github.com/ethanpil/wp-bloginfo-shortcode
原文外掛簡介
This plugin adds a shortcode [blog] to pull info from like the template tag bloginfo(). Its very simple to use and supports the same values as bloginfo().
Why a shortcode and not the function in PHP? Sometimes I need to implement slight variations of the same site. This allows me to have the values propagate into the post content as needed without remembering every place that needs changes.
Its used like this:
[blog info="name"]
This is the equivalent of the following in PHP:
bloginfo('name');
Here are some example uses:
[blog info="name"] - Displays the "Site Title" set in Settings > General.
[blog info="description"] - Displays the "Tagline" set in Settings > General.
[blog info="wpurl"] - Displays the "WordPress address (URL)" set in Settings > General.
[blog info="url"] - Displays the "Site address (URL)" set in Settings > General.
[blog info="admin_email"] - Displays the "E-mail address" set in Settings > General.
See here for all the usable parameters: https://codex.wordpress.org/Function_Reference/bloginfo
Fork away: https://github.com/ethanpil/wp-bloginfo-shortcode
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Bloginfo Shortcode」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Bloginfo Shortcode 》在網頁或文章中顯示有關您的部落格的資訊。使用 [bloginfo show=”url”] 呈現,其中 show 可以等於 https://codex.wordpress.org/Function_Refere...。
Dig Bloginfo Shortcode 》Dig Bloginfo Shortcode會取得部落格資訊並允許在HTML中使用,使用shortcode。, 範例:, [bloginfo key='name'], , [bloginfo key='url'], , [bloginfo key='...。
WP Random Blog Description 》— 英文 —, 此外掛可將標準部落格描述改為您自己的口號。, 您可以定義任意數量的口號。也可以定義口號更換的時間。, 啟用後,此外掛將您的預設描...。
Relative Site URL on Content Save 》此外掛能夠讓您在開發階段時發布內容,並且不必在切換到生產網址時回去修正內容的靜態 URL。註冊 [url] 短碼,與您網站的基本 URL 設定相關。當您點擊發布或...。
Bloginfo 》這是一個 WordPress 外掛程式,提供使用 shortcode 取得 WordPress 安裝的有用資訊。, 這個外掛程式是為了紀念 Esther Miranda Lima 而設,她是我沒有但我卻...。
