前言介紹
- 這款 WordPress 外掛「WP Advanced Include」是 2012-11-10 上架。
- 目前有 40 個安裝啟用數。
- 上一次更新是 2012-11-11,距離現在已有 4556 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3 以上版本才可以安裝。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
include | advanced include | include meta content | include post content | include post excerpt |
內容簡介
WP Advanced Include建立了一個「[include]」短代碼,可用於添加來自網站上任何文章或頁面的內容,包括文章內容、文章摘要和文章的 Meta 資料。
短代碼屬性:
content_id = [int] - 要包含內容的文章或頁面的 ID。
content_limit = [int] - 如有需要,限制內容,設定小於 1 的值以移除限制 - 預設值為 0。
content_limit_type ["words"|"chars"] - 設定限制內容是字詞或字元 - 預設值為「words」。
content_limit_append [string | 空字串] - 如果限制了內容,該字串將附加在內容末尾 - 預設值為「&hellip」。
content_type [post_content | post_excerpt | post_title | "meta name"] - 要包含的內容類型,如果是 Meta 名稱,請指定 Meta 名稱 - 預設值為「post_content」。
do_shortcode [true|false] - 指定是否解析短代碼 - 預設值為「true」。
注意事項
注意:使用「[include]」短代碼且將「do_shortcode」設定為 true,將會產生無限迴圈,請謹慎使用。
範例
簡單地包含文章內容
[include content_id=x]
包含文章內容的前 50 個字詞
[include content_id=x content_limit=50]
包含文章內容的前 150 個字元
[include content_id=x content_limit=150 content_limit_type=chars]
*包含文章 X 的「custom_meta_name」Meta 資料
[include content_id=x content_type="custom_meta_name"]
原文外掛簡介
WP Advanced Include creates an [include] shortcode which can be used to add content from any Post or Page on your site including Post Content, Post Excerpt and Post Meta
Shortcode Attributes:
content_id = [int] The id of the post or page you wish to include content from.
content_limit = [int] Limits the content if required, set to a value less than 1 to remove limiting – Default 0
content_limit_type [“words”|”chars”] Sets the content limit to be words or characters – Default “words”
content_limit_append [string|empty string] Text to be appended to the end of the content if limited – Default “&hellip”
content_type [post_content|post_excerpt|post_title|”meta name”] The content type to be included, if meta name, specify meta name. – Default “post_content”
do_shortcode [true|false] Specify whether to parse shortcodes of not – Default “true”
Caution
The use of [include] to include itself with do_shortcode set to true will create an infinite loop, use wisely.
Samples
simple include of post content
[include content_id=x]
include first 50 words of post content
[include content_id=x content_limit=50]
include first 150 characters of post content
[include content_id=x content_limit=150 content_limit_type=chars]
*include “custom_meta_name” meta from post X
[include content_id=x content_type=”custom_meta_name”]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Advanced Include」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。