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

No Sub-Category Posts in Loops

外掛說明

Once activated, only posts from the current category are displayed in your loop (no posts from sub cats).
That’s all it does. No options. If you find you need options, let me know and I’ll build them into it.

As of 0.4 I remove the filter after the main query is built so that it doesn’t interfere with widgets.
If you have a custom query or call wp_query on a category archive template, you’ll need to add and remove the filters before and after your query. Below is an example of how to do this if you use wp_query. Again, this is not necessary unless you have modified queries in a template file.

add_filter( 'posts_where', 'ft_nscp_mod_where' );
query_posts( array( 'your-custom' => 'args' ) );
remove_filter( 'posts_where', 'ft_nscp_mod_where' );

Its important that you remove what you add.

安裝方式

  1. Upload the directory “ft-no-subcats-in-loop” to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

常見問題集

Where can I find help or make suggestions?

http://fullthrottledevelopment.com/no-sub-category-posts-in-loop

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈No Sub-Category Posts in Loops〉的開發相關工作。

參與者

將〈No Sub-Category Posts in Loops〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

  • 0.5 – Fixed bug that broke plugin in 3.1. Props @ollybenson (http://gln.to/oshcw)
  • 0.4 – Fixed bug introduced with WordPress 3.1. Added inline docs. Removed filter after main query is built.
  • 0.3 – Modified directory structure so that plugin may be added and activated from wp-admin
  • 0.2 – Forgot to define a global, preventing posts from appearing that should. (thanks to http://redfootwebdesign.com for the heads up!)
  • 0.1 – Original release.