[WordPress] 外掛分享: Featured Posts Pro

WordPress 外掛 Featured Posts Pro 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Featured Posts Pro」是 2016-10-02 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2019-04-04,距離現在已有 2520 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0.1 以上版本才可以安裝。
  • 有 5 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

thapalaxman |

外掛標籤

featured | featured posts | featured post widget |

內容簡介

Featured Posts Pro

讓管理員和編輯能夠輕易地將文章、頁面和自訂文章設定為特色文章。您可以在文章列表頁面或文章編輯頁面上透過勾選方塊,將文章、頁面和自訂文章設為特色文章。請參閱截圖以了解更多。

Featured Posts Pro 也新增了一個小工具,用於列出最近的特色文章。這與預設的最新文章小工具類似,但這個小工具會顯示最近的特色文章。Featured Posts Pro 小工具的樣板可以透過您的佈景主題進行自訂。

如何在佈景主題中使用

要取得特色文章,您需要建立自訂查詢,如下所示:

取得帶有排列順序的特色文章範例程式碼

$args = array(
‘post_type’ => ‘any’,
‘posts_per_page’ => 10,
‘no_found_rows’ => true,
‘post_status’ => ‘publish’,
‘ignore_sticky_posts’ => true,
‘meta_query’ => array(
    array(
        ‘relation’ => ‘OR’,
        array(
            ‘key’ => ‘post_featured_position’,
            ‘compare’ => ‘EXISTS’
        ),
        array(
            ‘key’ => ‘post_featured_position’,
            ‘compare’ => ‘NOT EXISTS’
        ),
    ),
    array(
        ‘relation’ => ‘AND’,
        ‘key’ => ‘is_post_featured’,
        ‘compare’ => ‘=’,
        ‘value’ => 1
    )
),
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘ASC’,
) ;
$featuredPosts = new WP_Query( $args );

<h3>取得沒有排序的特色文章範例程式碼</h3>$args = array(
‘posts_per_page’ => 10,
‘no_found_rows’ => true,
‘post_status’ => ‘publish’,
‘ignore_sticky_posts’ => true,
‘meta_key’ => ‘is_post_featured’ // 這是用於特色文章的元鍵
) ;
$featuredPosts = new WP_Query( $args );

或者如果您只想

如何自訂小工具

您可以按照以下步驟自訂小工具樣板:
1. 在您的佈景主題資料夾中建立名為 ‘featured_posts_pro_tpls’ 的資料夾
2. 在剛才建立的 ‘featured_posts_pro_tpls’ 資料夾中建立兩個名為 ‘tpl_featured_posts_pro_large.php’ 和 ‘tpl_featured_posts_pro_small.php’ 的 PHP 檔案
3. 當小工具大小設定為大時,樣板檔案 ‘tpl_featured_posts_pro_large.php’ 將用於呈現小工具,同理,‘tpl_featured_posts_pro_small.php’ 則用於小型小工具
4. 從插件資料夾 > featured-posts-pro > public > partials > featured_posts_pro-widget.php 中複製並貼上內容到上述兩個檔案中

原文外掛簡介

Featured Posts Pro
allows administrator and editor an option to set posts, pages & custom posts as a featured posts very easily. Posts, pages & custom posts can be set as featured posts using a checkbox on the posts list page or on the edit page of the post. Please see screenshots to be more clear.
Featured Posts Pro
also adds a widget that will list the recent featured posts. This is similar to the default recent posts widget except this widget displays recent featured posts instead. The template for the Featured Posts Pro Widget can be customized with your theme.
How to use in the theme
You can to get the featured posts, you need to make a custom query as follows
sample code to get the featured posts with orders
`$args = array(
‘post_type’ => ‘any’,
‘posts_per_page’ => 10,
‘no_found_rows’ => true,
‘post_status’ => ‘publish’,
‘ignore_sticky_posts’ => true,
‘meta_query’ => array(
array(
‘relation’ => ‘OR’,
array(
‘key’ => ‘post_featured_position’,
‘compare’ => ‘EXISTS’
),
array(
‘key’ => ‘post_featured_position’,
‘compare’ => ‘NOT EXISTS’
),
),
array(
‘relation’ => ‘AND’,
‘key’ => ‘is_post_featured’,
‘compare’ => ‘=’,
‘value’ => 1
)
),
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘ASC’,
) ;
$featuredPosts = new WP_Query( $args );

sample code to get the featured posts without order

$args = array(
‘posts_per_page’ => 10,
‘no_found_rows’ => true,
‘post_status’ => ‘publish’,
‘ignore_sticky_posts’ => true,
‘meta_key’ => ‘is_post_featured’ //this is the meta key used for the featured posts
) ;
$featuredPosts = new WP_Query( $args );`
or if you simple want tp
How to customize the widget
You can customize the widget template as follows:
1. create a folder ‘featured_posts_pro_tpls’ inside your theme folder
2. create two php files named as ‘tpl_featured_posts_pro_large.php’ & ‘tpl_featured_posts_pro_small.php’ in the ‘featured_posts_pro_tpls’ folder you just created
3. template file ‘tpl_featured_posts_pro_large.php’ will be used to render the widget when widget size is selected as large & similarly ‘tpl_featured_posts_pro_small.php’ is for small widget size
3. copy and paste the content from plugin_fold er > featured-posts-pro > public > partials > featured_posts_pro-widget.php in the above two files
4. make the layout changes as you wish.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Featured Posts Pro」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 1.2 | 1.4 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.3.5 | 1.3.6 | 1.3.7 | 1.3.8 | 1.3.9 | trunk |

延伸相關外掛(你可能也想知道)

  • Relevant – Related, Featured, Latest, and Popular Posts by BestWebSoft 》Relevant 外掛可以在你的 WordPress 網站上顯示相關、最新、熱門和精選文章。你可以自訂小工具、變更外觀、熱門文章數量,以及更多。, 突顯並顯示適當的資訊...。
  • Recent & Featured Posts Widget 》最新和精選文章小工具會添加一個帶有縮略圖、文章標題、日期、時間和節錄的最新文章或您選擇的文章列表。, 功能:, , 節錄長度。更改節錄文字的單詞數。, 節錄...。
  • AK Featured Post Widget 》這個小工具易於設定,可以在你網誌的任何小工具區域中顯示任何類別中的帖子(從1到99個)。, , 你可以創建自訂標題, 你可以設定要顯示多少篇文章, 你可以選擇...。
  • WP Featured Posts 》WP Featured Posts 是一個外掛,可選擇特色文章、可排序和置頂自訂文章類型。, 功能:, , 方便選擇特色文章。, 方便排序特色文章。, 支援自訂文章類型。, 自...。
  • Yet Another Featured Posts Plugin (YAFPP) 》Yet Another Featured Posts Plugin (YAFPP) 可以讓你在 WordPress 博客中簡單地突出某些文章。你只需要在 WordPress 的文章列表頁面中,勾選與每篇文章相關...。
  • Featured Posts Grid 》實際演示, 更多資訊, 留言/建議, 作者介紹, 這款外掛能夠在模板或文章中展示任意位置的文章網格。, 透過管理員選項選單,外觀高度可自訂(例如:顏色、陰影等...。
  • Featured Post Exclude Category for Genesis 》預設的 Genesis 特色文章外掛程式很不錯,但您只能選擇包括所有類別或特定類別。您可以排除先前顯示過的文章或「粘性貼文」,但無法排除特定類別中的所有文章...。
  • Tidyhive Featured Posts 》這個外掛可以讓使用者在不需要編輯每篇文章的情況下,僅需點擊一下即可標註某篇文章為精選文章。外掛還包含一個小工具(widget),可以顯示所有被標記為精選文...。
  • Featured Posts Widget 》一個 WordPress 外掛,可創建「精選文章」小工具, 功能:, * 可自定義標題, * 可選擇文章類別, * 可自定義縮圖(無縮圖、上方、下方、左方、右方), * 可自定...。
  • Featured Posts Slideshow 》Featured Posts Slideshow 可以顯示您想要的任意篇文章圖片。這是一個非常漂亮且強大的 JavaScript 幻燈片。它會顯示您所定義類別中每篇文章的特定圖片。您可...。
  • Featured Custom Posts Widget 》這個外掛最初是設計為一個佈景主題功能,但我們認為對其他人也很有用。它設計使用以下外掛:, , Custom Post Type UI, Taxonomy Images, , 當然,你可以創建...。
  • YD Featured Box Widget 》迅速且簡單的精選方塊小工具, 添加一個小工具,顯示方形或矩形的圖像、標題和副標題,並指向特定的文章、頁面、分類或主題。, 漂亮的 CSS 樣式設計,建議用於...。
  • WP Featured News – Custom Posts Listing Elements 》Featured News 外掛可以讓你在網頁上的任何地方顯示文章,並提供了 10 種強大而具有創意的文章區塊設計。此外,此外掛不僅限於您網站的 widget 區域,而是可...。
  • Roarender Featured Posts Box 》一款動畫特色文章框外掛。如果不存在,將創建一個「特色」分類,並以動畫效果顯示特色文章。, 動畫速度可以在管理面板上全面調整,邊框、字體顏色、背景顏色...。
  • Scrollarama 》這個外掛會創建一個小工具,循環顯示最近十篇貼文,使用您選擇的 jQuery Cycle 特效。, 設定, 您可以更改以下設定:, , 標題:小工具標題, 分類:從哪個分類...。

文章
Filter
Apply Filters
Mastodon