Title: Featured Post
Author: Sovit Tamrakar
Published: <strong>2010 年 6 月 23 日</strong>
Last modified: 2014 年 9 月 12 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/featured-post.svg)

# Featured Post

 由 [Sovit Tamrakar](https://profiles.wordpress.org/ssovit/) 開發

[下載](https://downloads.wordpress.org/plugin/featured-post.3.2.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/featured-post/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/featured-post/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/featured-post/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/featured-post/#developers)

 [技術支援](https://wordpress.org/support/plugin/featured-post/)

## 外掛說明

Plugin for featured wordpress posts. This is a cool plugin that makes it easier 
to mark posts as featured posts (not using specific categories) and simple markup
to show theme from your theme file.

Add `<?php query_posts($query_string."&featured=yes"); ?>` before the post loop 
starts and manage the featured posts from the post edit list.

Now added widget for listing featured post in sidebar widgets with custom number
of post.

_Supports Custom Post Type_

Visit us on [GitHub](https://github.com/ssovit/featured-post) to support and donate

## 安裝方式

This section describes how to install the plugin and get it working.

 1. Upload the plugin folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to post list are then choose your featured post.
 4. Put the code `<?php query_posts($query_string."&featured=yes"); ?>` before the 
    post loop starts where you want to showt he featured posts.
 5. Put a widget on sidebar for listing featured post in unordered list
 6. NOTE: ****Please just after the loop you have called the custom query don’t forget
    to add wp_reset_query(); after the loop, else you will have all other normal post
    loops showing the featured posts.

## 常見問題集

  Why was this plugin created?

This plugin was created to for the featured post management. Its easy and any minor
wordpress developer or user can use and integrate into his wordpress theme with 
ease.

  When I use this plugin to show featured post even when i am not adding “featured
=yes” before the loop?

This is not a common problem, but this occurs when you are have called query_posts(***.”
featured=yes”); before the normal template loop like in category.php or archive.
php or even index.php. So, its a good practice to add a wp_reset_query(); after 
each custom query you make adding “featured=yes”. So why not add the wp_reset_query();
after the loop of featured posts.

  What is this plugin exactly?

As mentioned earlier, this is just a simple featured posts management plugin that
adds the post meta data as featured=yes for the particular post marked as featured.

  Does This Support Custom Post Type?

Yes, it does. To display featured post of any Custom Post Type pass the arguement`
post_type=YOUR_POST_TYPE` along with `featured=yes`. For example, if I have custom
post type “portfolio” and I want to show featured posts in post type “portfolio’(
so called featured portfolio), then I would do, `query_posts('post_type=portfolio&
featured=yes')` before the `have_posts()` loop.

  Does it work with WP_Query() class?

Yes, absolutely, it does. you can pass it as string type arguement like `$query=
new WP_Query('post_type=portfolio&featured=yes&posts_per_page=1')` or even in array
type arguement like `$query=new WP_Query(array('post_type'=>'portfolio','featured'
=>'yes'));` then use how the regular WP_Query is used.

  How Does it work exactly?

This plugin actually hooks over `pre_get_posts` filter and make the WP_Query class
to only fetch posts/entries which are marked featured whenever featured=yes query
var is passed as query arguement(Hope that makes sense).

## 使用者評論

![](https://secure.gravatar.com/avatar/30231bfd5dececd992e9be580cb19b17af1048891fb577467bfd92849b51ed5f?
s=60&d=retro&r=g)

### 󠀁[As of PHP 8 This plugin is No Longer Viable](https://wordpress.org/support/topic/as-of-php-8-this-plugin-is-no-longer-viable/)󠁿

 [rftbdev](https://profiles.wordpress.org/rftbdev/) 2023 年 7 月 20 日

This is not a hate post. The plugin worked fine for a website for many years! Unfortunately
with PHP updates one of the functions has been removed completely as of PHP 8.create_function()
has been removed from PHP as of version 8.

![](https://secure.gravatar.com/avatar/c786390f81ee978c57d2648023319ac6dd9c2ddd633574e42c5252a8815e55df?
s=60&d=retro&r=g)

### 󠀁[Easy and effective](https://wordpress.org/support/topic/easy-and-effective-20/)󠁿

 [Daniel Hendricks](https://profiles.wordpress.org/hendridm/) 2016 年 11 月 30 日

I love this plugin. It’s simple, small and easy to modify. Best of all, it has a
simple interface for end-users. NOTE: You may wish to download the plugin from the
GitHub link in the description. This one is at version 3.2.1 but the GitHub one 
is at version 3.5. Works great on WordPress 4.6.1!

![](https://secure.gravatar.com/avatar/6d8d49d6a1ec85ef7b859140eb3fe7e875580e948dce50e473708b1a11b2370a?
s=60&d=retro&r=g)

### 󠀁[Customize the look](https://wordpress.org/support/topic/customize-the-look-2/)󠁿

 [vnastey](https://profiles.wordpress.org/vnastey/) 2016 年 9 月 3 日

This plugin is awesome, but how can i customize the output? how to rewrite the output,
for example, print the category, content of the post?

 [ 閱讀全部 13 則使用者評論 ](https://wordpress.org/support/plugin/featured-post/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Featured Post〉的開發相關工作。

參與者

 *   [ Sovit Tamrakar ](https://profiles.wordpress.org/ssovit/)
 *   [ Ghanshyam Khanal ](https://profiles.wordpress.org/gskhanal/)

[將〈Featured Post〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/featured-post)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/featured-post/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/featured-post/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/featured-post/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/featured-post/)。

## 變更記錄

#### 2.0.1

Fixed Some Minor Bugs

#### 2.0

Did major update to work with Worpdress Version 3.5

#### 1.4.1

Fixed some other minor bug with widget (Just for some more features updates)

#### 1.4.0

Fixed Some Minor bugs with featured post management (I really didn’t want to do 
it)

#### 1.3.1

Fixed some bug with widget and backend post section (I wanted to work it out)

#### 1.3

Added multi-instance widget(I am not sure if this was needed)

#### 1.2.1.0

Added Widget Sidebar for featured post (Just a dumb update)

#### 1.0

Frist stable version 1.0 (Just forget this version)

## 中繼資料

 *  版本 **3.2.1**
 *  最後更新 **8 年前**
 *  啟用安裝數 **900+**
 *  WordPress 版本需求 ** 3.8 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.0.38**
 *  語言
 * [English (US)](https://wordpress.org/plugins/featured-post/)
 * 標籤:
 * [featured](https://tw.wordpress.org/plugins/tags/featured/)[featured post](https://tw.wordpress.org/plugins/tags/featured-post/)
   [post](https://tw.wordpress.org/plugins/tags/post/)[posts](https://tw.wordpress.org/plugins/tags/posts/)
 *  [進階檢視](https://tw.wordpress.org/plugins/featured-post/advanced/)

## 評分

 4.6 星，滿分為 5 星

 *  [  12 個 5 星使用者評論     ](https://wordpress.org/support/plugin/featured-post/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/featured-post/reviews/?filter=4)
 *  [  1 個 3 星使用者評論     ](https://wordpress.org/support/plugin/featured-post/reviews/?filter=3)
 *  [  1 個 2 星使用者評論     ](https://wordpress.org/support/plugin/featured-post/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/featured-post/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/featured-post/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/featured-post/reviews/)

## 參與者

 *   [ Sovit Tamrakar ](https://profiles.wordpress.org/ssovit/)
 *   [ Ghanshyam Khanal ](https://profiles.wordpress.org/gskhanal/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/featured-post/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://gum.co/wppress-donate)