Title: Only One Category
Author: pressupinc
Published: <strong>2013 年 7 月 23 日</strong>
Last modified: 2016 年 2 月 26 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/only-one-category.svg)

# Only One Category

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

[下载](https://downloads.wordpress.org/plugin/only-one-category.1.0.4.zip)

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

 [支持](https://wordpress.org/support/plugin/only-one-category/)

## 描述

Only One Category makes sure users only select one category for their post by making
the selectors radio buttons, which only allow one category to be selected.

Rather than spend all your time maintaining the editorial style of only putting 
posts into a single category, this plugin is a quick way for you to enforce that
standard. It makes it impossible for a person to accidentally break your site’s 
layout of functionality by putting a post in multiple categories. They just can’t
do it, whether by accident or intention.

## 屏幕截图

[⌊How it'll make the Categories section look while editing a post on the current
version of WordPress.⌉⌊How it'll make the Categories section look while editing 
a post on the current version of WordPress.⌉[

How it’ll make the Categories section look while editing a post on the current version
of WordPress.

[⌊How it looks when you Quick Edit a post with the new UI.⌉⌊How it looks when you
Quick Edit a post with the new UI.⌉[

How it looks when you Quick Edit a post with the new UI.

## 安装

Activate the plugin. Now you should only see radio buttons where you previously 
saw category checkboxes. That’s why you downloaded it, right?

## 常见问题

  Why use this plugin?

The biggest reason that you might want to use this plugin is that your site is structured
around the assumption that posts will exist in a single category. This makes it 
impossible for a person to accidentally break your site’s layout of functionality
by putting a post in multiple categories.

If you have many contributors and don’t have the resources for a thorough editorial
flow with checks and rechecks, the plugin is an easy quick way to make sure your
standard is maintained without taking a lot of time correcting mistakes.

  How does it work?

Plugin live-swaps check boxes for radio button before the pages are sent to users.

  Are there any options?

Not currently. If they ever make sense — if for example we were to add the option
to use it one all hierarchical taxonomies — it may possibly get one.

## 评价

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

### 󠀁[Works!](https://wordpress.org/support/topic/works-1239/)󠁿

 [thiagoalcav](https://profiles.wordpress.org/tkramertk/) 2017 年 4 月 4 日

Works like a charm!

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

### 󠀁[Post only ?](https://wordpress.org/support/topic/post-only/)󠁿

 [Trapipo](https://profiles.wordpress.org/trapipo/) 2016 年 9 月 16 日

Hello, works perfectly for post, but I would like to have the same for my pages 
🙂

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

### 󠀁["by accident or intention" is not correct](https://wordpress.org/support/topic/by-accident-or-intention-is-not-correct/)󠁿

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

By intention, anyone can bypass the limit by changing the html in their browser.

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

### 󠀁[Works great](https://wordpress.org/support/topic/works-great-2915/)󠁿

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

Works as expected, really good work!

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

### 󠀁[Excellent plugin to make things easier for editors](https://wordpress.org/support/topic/excellent-plugin-to-make-things-easier-for-editors/)󠁿

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

Thank you David. Exactly what I wanted. Here is a suggestion: Allow an option to
prevent selecting the top-level category, if there are sub-categories. Still display
the top level, just don’t provide a button. Reason – because I only want the sub-
categories to hold posts.

 [ 阅读所有7条评价 ](https://wordpress.org/support/plugin/only-one-category/reviews/)

## 贡献者及开发者

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

贡献者

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

[帮助将「Only One Category」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/only-one-category)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.4 (2016.02.25)

 * Quick Edit now works! Big thanks to [Andrew Nimmo](https://github.com/nimmolo)
   for the [PR](https://github.com/pressupinc/only-one-category/pull/4).

#### 1.0.3 (2016.02.25)

 * David can’t count…

#### 1.0.2 (2016.01.26)

 * Removed deprecated use of get_all_category_ids
 * Bumped tested version number

#### 1.0.1 (2015.04.21)

 * VCS headaches…

#### 1.0.0 (2015.04.21)

 * Some basic cleanup of code quality.
 * Making it not function for quick-edit, as it was broken and so far it’s not been
   worth fixing.

#### 0.2.0 (2013.08.16)

 * Made plugin file’s description shorter.
 * Confirmed 3.6 compatibility.
 * Made catcher a properly hooked function.

#### 0.1.5 (2013.07.23)

 * Shortened short description

#### 0.1.4 (2013.07.23)

 * put screenshot in the wrong place. yay!

#### 0.1.3 (2013.07.23)

 * git svn is hard * 2

#### 0.1.2 (2013.07.23)

 * git svn is hard

#### 0.1.1 (2013.07.23)

 * Documentation improvements

#### 0.1.0 (2013.07.22)

 * 初始

## 额外信息

 *  版本 **1.0.4**
 *  最后更新：**10 年前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 2.8 或更高版本 **
 *  已测试的最高版本为 **4.4.34**
 *  语言
 * [English (US)](https://wordpress.org/plugins/only-one-category/)
 * 标签
 * [admin](https://cn.wordpress.org/plugins/tags/admin/)[categories](https://cn.wordpress.org/plugins/tags/categories/)
   [edit](https://cn.wordpress.org/plugins/tags/edit/)[post](https://cn.wordpress.org/plugins/tags/post/)
 *  [高级视图](https://cn.wordpress.org/plugins/only-one-category/advanced/)

## 评级

 4.1 星（最高 5 星）。

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

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

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

## 贡献者

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

## 支持

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

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