[WordPress] 外掛分享: VI: Include Post By

首頁外掛目錄 › VI: Include Post By
10+
安裝啟用
尚無評分
2061 天前
最後更新
問題解決
WordPress 4.0+ PHP 5.2.4+ v0.4.200706 上架:2020-04-06

內容簡介

VI:Include Post By - 提供您的頁面和文章短碼,讓您可以通過它們的 ID 或文章類別在其中顯示其他頁面和文章。選項包括顯示標題、元數據、內容、縮略圖、摘要和頁尾。

即將推出的功能

更多顯示選項。
分類和文章類型不可知。
可設置默認縮略圖。
抓取實際的小型縮略圖像以供srcset使用。

說明

通過 ID 包含單個文章的短碼

[include-post-by-id
id="123"
link="true"
moretext="閱讀更多"
card="false"
display="title,meta,thumbnail,content,excerpt,more,footer,all"
display_header="title,meta,thumbnail,content,excerpt,more,footer,all"
display_body="title,meta,thumbnail,content,excerpt,more,footer,all"
display_footer="title,meta,thumbnail,content,excerpt,more,footer,all"
image_size="thumbnail,medium,large,full,custom-image-size"
class_inner="custom-class-name"
class_header="custom-class-name"
class_body="custom-class-name"
class_footer="custom-class-name"
class_thumbnail="custom-class-name"
]

id = 要顯示的文章
link = 標題/縮略圖是否連接到文章
moretext = 編輯閱讀更多鏈接的文本
card = 將類名設置為引導卡,無需進一步自定義類名
display[x] = CSV 格式的顯示選項,順序很重要
class[x] = 將添加到每個容器元素的自定義類名

通過其類別包含單個/多個文章的短碼。
包含在 include-post-by-id 中使用的每個選項都將被傳遞到此處。
此功能將查詢 DB,然後為每篇結果文章調用 include-post-by-id。
這裡顯示的僅是此功能特有的選項。

[include-post-by-cat
cat="123"
order="DESC"
orderby="date"
paginate=true
perpage="5"
offset="0"
class_container="custom-class-name"
]

cat = 要顯示的類別
order = 排序順序
orderby = 排序方式
paginate = true/false
perpage = 每頁的項目數。-1 = 所有
offset = 要跳過的文章數,如果您正在組合多個包含,這很有用
class_container = 包裝元素中使用的自定義類名

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4.200706) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「VI: Include Post By」→ 直接安裝(推薦)

原文外掛簡介

VI: Include Post By – provides your pages and posts with shortcodes allowing you to display other pages and posts inside them either by their ID or by post category. Options to display title,meta,content,thumbnail,excerpt,footer.
Coming Soon
More display options.
Taxonomy and post type agnostic
setable default thumbnail
grab the actual small thumbnail image for srcset
Instructions
Shortcode for including a single post by its ID
[include-post-by-id
id="123"
link="true"
moretext="Continue Reading"
card="false"
display="title,meta,thumbnail,content,excerpt,more,footer,all"
display_header="title,meta,thumbnail,content,excerpt,more,footer,all"
display_body="title,meta,thumbnail,content,excerpt,more,footer,all"
display_footer="title,meta,thumbnail,content,excerpt,more,footer,all"
image_size="thumbnail,medium,large,full,custom-image-size"
class_inner="custom-class-name"
class_header="custom-class-name"
class_body="custom-class-name"
class_footer="custom-class-name"
class_thumbnail="custom-class-name"
]

id = post to be shown
link = whether the title/thubmnail are links to the post
moretext = edit the text of the read-more link
card = will set class names to bootstrap cards, no further class customization is required
display[x] = display options as a CSV, order counts
class[x] = a custom class name that will be added to each container element

Shortcode for including single/multiple posts by their category.
Every option required or used in the include-post-by-id will also pass through here.
This function will query the DB and then call include-post-by-id once for each resulting post.
Shown here are only the options which are unique to this function.
[include-post-by-cat
cat="123"
order="DESC"
orderby="date"
paginate=true
perpage="5"
offset="0"
class_container="custom-class-name"
]

cat = category to be shown
order = sort order
orderby = what to sort by
paginate = true/false
perpage = items per page. -1 = all
offset = how many posts to skip, useful if you are combining multiple includes
class_container = custom-class-name used in the wrapper element

延伸相關外掛

文章
Filter
Mastodon