Title: Posts By Category Widget
Author: volfro
Published: <strong>2013 年 12 月 10 日</strong>
Last modified: 2013 年 12 月 17 日

---

搜索插件

![](https://ps.w.org/widget-posts-by-category/assets/banner-772x250.png?rev=818185)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/widget-posts-by-category_eec096.svg)

# Posts By Category Widget

 作者：[volfro](https://profiles.wordpress.org/volfro/)

[下载](https://downloads.wordpress.org/plugin/widget-posts-by-category.1.0.4.zip)

 * [详情](https://cn.wordpress.org/plugins/widget-posts-by-category/#description)
 * [评价](https://cn.wordpress.org/plugins/widget-posts-by-category/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/widget-posts-by-category/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/widget-posts-by-category/#developers)

 [支持](https://wordpress.org/support/plugin/widget-posts-by-category/)

## 描述

This widget displays posts in the category, order, and quantity of your choosing.
It supports custom templates!

After installation, drag-and-drop the new “Category Widget” to a widget area, choose
the categories you wish to display, and tell it the order and quantity in which 
you wish to display them.

### Templates

The default template is just plain-ol’ HTML5, without any CSS; it’s meant to fit
right into any theme without modification.

However, if you’re a theme developer and you wish to use custom markup or WP functions
inside your template, here’s how to customize it:

 1. In the root of your theme’s directory, create a new file called `catswidget.php`(
    or copy `template.php` from `posts-by-cat-widget/views` to your theme’s root, and
    rename it `catswidget.php`, if you’d rather use the default as a starting point).
 2. Craft your loop. Just make sure you use the `$posts` variable, like this:`if ( 
    $posts -> have_posts() ) :
     while ( $posts -> have_posts() ) : $posts -> the_post();?
    > // Your markup here endwhile; endif;
 3. The widget is just a simple custom loop, so you’ll have access to whatever data
    WP_Query has access to inside the loop.

### TODO

 * Perhaps we could use it to query custom post types/taxonomies, not just Posts
 * Add hooks/filters
 * Add ability to extend admin

## 安装

 1. Upload `posts-by-cat-widget` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use the “Category Widget” in any of your sidebars/widget areas

## 评价

此插件暂无评价。

## 贡献者及开发者

「Posts By Category Widget」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ volfro ](https://profiles.wordpress.org/volfro/)

[帮助将「Posts By Category Widget」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/widget-posts-by-category)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/widget-posts-by-category/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/widget-posts-by-category/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/widget-posts-by-category/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/widget-posts-by-category/)。

## 更新日志

#### 1.0.4

 * Update to 3.8

#### 1.0.2

 * Plugin wasn’t installing properly in the WP dashboard…maybe updating its headers
   will fix the issue.

#### 1.0.1

 * Minor updates to readme

#### 1.0

 * Release

## 额外信息

 *  版本 **1.0.4**
 *  最后更新：**12 年前**
 *  活跃安装数量 **80+**
 *  WordPress 版本 ** 3.7 或更高版本 **
 *  已测试的最高版本为 **3.7.41**
 *  语言
 * [English (US)](https://wordpress.org/plugins/widget-posts-by-category/)
 * 标签
 * [category](https://cn.wordpress.org/plugins/tags/category/)[posts](https://cn.wordpress.org/plugins/tags/posts/)
   [widget](https://cn.wordpress.org/plugins/tags/widget/)
 *  [高级视图](https://cn.wordpress.org/plugins/widget-posts-by-category/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/widget-posts-by-category/reviews/)

## 贡献者

 *   [ volfro ](https://profiles.wordpress.org/volfro/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/widget-posts-by-category/)