[WordPress] 外掛分享: NS Featured Posts

首頁外掛目錄 › NS Featured Posts
WordPress 外掛 NS Featured Posts 的封面圖片
4,000+
安裝啟用
★★★★
4.8/5 分(29 則評價)
188 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.2+ v3.0.1 上架:2014-06-03

內容簡介

NS精選文章

此外掛為每個列表項目新增核取方塊。您可以輕鬆勾選/取消勾選「精選文章」功能,勾選時會為 meta key _is_ns_featured_post 設置 meta value 為 yes。從外掛設定,您可以選擇要將「精選文章」功能新增至哪些文章類型。

在主題中使用

此外掛僅設置/取消設置指定文章的 meta key。您需要在您的主題中實作此功能,以使用「精選文章」功能。

示例:

$query = new WP_Query( array( 'meta_key' => '_is_ns_featured_post', 'meta_value' => 'yes' ) );

這將取得已標記為「精選文章」的文章列表。

想要看看此功能如何在頁面模板中使用?
點擊此連結查看範例

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.0.1) 或搜尋安裝

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

原文外掛簡介

NS Featured Posts
This plugin adds checkboxes for each list item. You can easily check/uncheck the Featured flag. Checking the Featured will set the meta value yes for meta key _is_ns_featured_post. You can choose which post types you want Featured functionality from plugin settings.
Using in theme
This plugin only sets/unsets the meta key for assigned posts. You need to implement it in your theme to get Featured functionality.
Example:
$query = new WP_Query( array( 'meta_key' => '_is_ns_featured_post', 'meta_value' => 'yes' ) );

This will fetch the list of posts that are checked as Featured.
Want to see how this can be used in a Page Template?
Click this link to see an example

延伸相關外掛

文章
Filter
Mastodon