Title: Allow HTML in Category Descriptions
Author: Arno Esterhuizen
Published: <strong>2008 年 6 月 11 日</strong>
Last modified: 2026 年 3 月 5 日

---

搜索插件

![](https://ps.w.org/allow-html-in-category-descriptions/assets/banner-772x250.png?
rev=846978)

![](https://s.w.org/plugins/geopattern-icon/allow-html-in-category-descriptions.
svg)

# Allow HTML in Category Descriptions

 作者：[Arno Esterhuizen](https://profiles.wordpress.org/arnoesterhuizen/)

[下载](https://downloads.wordpress.org/plugin/allow-html-in-category-descriptions.1.2.5.zip)

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

 [支持](https://wordpress.org/support/plugin/allow-html-in-category-descriptions/)

## 描述

When you add text to the category description textarea and save the category, WordPress
runs content filters that strips out all but the most basic formatting tags.

This plugin disables those filters for roles with the necessary permissions. Any
html code you add to the category description will not be stripped out.

This plugin does not do anything other than disable the filters. It does not protect
you from entering invalid HTML, nor does it help you create WYSIWYG HTML. You can
use the post or page composing screen to help you create the text and formatting.
Switch to the ‘code’ tab and copy the HTML code into the category description field.

## 屏幕截图

[⌊Adding HTML code to the category description⌉⌊Adding HTML code to the category
description⌉[

Adding HTML code to the category description

[⌊A preview of the category description in the category list admin screen⌉⌊A preview
of the category description in the category list admin screen⌉[

A preview of the category description in the category list admin screen

[⌊What the category looks like on the front-end if your theme supports it
(here 
shown with the Twenty Fourteen theme)⌉⌊What the category looks like on the front-
end if your theme supports it
(here shown with the Twenty Fourteen theme)⌉[

What the category looks like on the front-end if your theme supports it (here shown
with the Twenty Fourteen theme)

## 安装

 1. Upload `html-in-category-descriptions.php` to the `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件
 3. Paste or type HTML code in the category description and save (Refer to “The category
    description isn’t saving. Why?” in the FAQ if you’re having problems saving)
 4. Enjoy HTML in your category descriptions (Refer to “I see the HTML in the admin
    panel preview, but not on my website. Why?” in the FAQ if the HTML isn’t appearing
    on your website)

## 常见问题

### The category description isn’t saving. Why?

 1. For security reasons, the role that you’re using to edit the description needs 
    to have the “unfiltered_html” capability
 2. In single site installations, Administrators and Editors has this capability by
    default; in a multisite installation, only Super Admins have this capability
 3. Refer to [WordPress Roles and Capabilities](https://wordpress.org/support/article/roles-and-capabilities/#unfiltered_html)

### I see the HTML in the admin panel preview, but not on my website. Why?

 1. For the HTML to show up on your website, the theme you’re using needs to output
    the category description
 2. Contact your theme developer and refer them to [WordPress Developer Documentation – category_description](https://codex.wordpress.org/Function_Reference/category_description)

### How do I contact you?

 1. **Email Address:** arno.esterhuizen+wordpress-plugins@gmail.com
 2. **Subject Line:** Question: WordPress Plugin: Allow HTML in Category Descriptions
 3. **Donations:** https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id
    =SGS5KSM9N4D3Y

## 评价

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

### 󠀁[Work well with WordPress 6](https://wordpress.org/support/topic/work-well-with-wordpress-6/)󠁿

 [Nicolas Reznikoff](https://profiles.wordpress.org/reznikoffnicolas/) 2022 年 9
月 21 日

Work well with Wordpress 6, tested version 6.0.2 and no errors in the logs. Html
filters are perfectly disabled on the category description. For example, now the
addition of parameters and properties on the links are possible. < a href="./?order
=alpha" class="aa">Order< /a> —

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

### 󠀁[Simple et efficace](https://wordpress.org/support/topic/simple-et-efficace-189/)󠁿

 [dmsr](https://profiles.wordpress.org/dmsr/) 2022 年 7 月 22 日 1 回复

Très pratique et fort utile!

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

### 󠀁[Also works for WooCommerce product categories](https://wordpress.org/support/topic/also-works-for-woocommerce-product-categories/)󠁿

 [billcv](https://profiles.wordpress.org/billcv/) 2022 年 5 月 7 日 1 回复

I have had HTML in my product category descriptions for years. Every new Wordpress
release seems to break long-standing features, so I shouldn't have been surprised
when I edited a product category and found the HTML stripped out. I took a look 
at what this plugin does and thought it would probably fix the problem and, indeed,
it does. Thanks!

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

### 󠀁[Perfekt!](https://wordpress.org/support/topic/perfekt-162/)󠁿

 [Jan](https://profiles.wordpress.org/zwerg277/) 2021 年 2 月 14 日 1 回复

Vielen Dank 🙂

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

### 󠀁[EXACTLY what I want](https://wordpress.org/support/topic/exactly-what-i-want-14/)󠁿

 [iainlaird](https://profiles.wordpress.org/iainlaird/) 2020 年 7 月 6 日 1 回复

This is EXACTLY what I have been looking for for 3 months. Thank you so much. Now
I can actually make my links LOOK like links on my category pages.

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

### 󠀁[Simple, straightforward](https://wordpress.org/support/topic/simple-straightforward-20/)󠁿

 [twoforksandapassport](https://profiles.wordpress.org/twoforksandapassport/) 2020
年 7 月 1 日 1 回复

A ridiculously simple plugin that does what it says and then opens up a world of
possibilities! Recommended all the way!

 [ 阅读所有41条评价 ](https://wordpress.org/support/plugin/allow-html-in-category-descriptions/reviews/)

## 贡献者及开发者

「Allow HTML in Category Descriptions」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Arno Esterhuizen ](https://profiles.wordpress.org/arnoesterhuizen/)
 *   [ timmmy ](https://profiles.wordpress.org/timmmy/)

[帮助将「Allow HTML in Category Descriptions」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/allow-html-in-category-descriptions)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.2.5

 * Update tested wordpress versions to 6.9.1
 * Fix CVE-2026-0693

#### 1.2.4

 * Update tested wordpress versions to 6.4.3

#### 1.2.3

 * Change the plugin initialisation after the previous security update went out 
   in a bit of a rush.

#### 1.2.2

 * Address a security vulnerability

#### 1.2.1.1

 * Add a text domain for translation purposes

#### 1.2.1

 * Minor formatting of the plugin code, syntax, etc.
 * Added a banner image for the plugin page

#### 1.2

 * A version bump to indicate to WordPress that the plugin was reviewed and tested
   in the latest version of WordPress
 * Made sure that the pre_filters array had corresponding items in the filters array
 * Added a donation link

#### 1.1

 * Added a filter array for the textareas admin displays

#### 1.0

 * First release into the wild after helping someone on a forum post

## 额外信息

 *  版本 **1.2.5**
 *  最后更新：**9 月前**
 *  活跃安装数量 **8,000+**
 *  WordPress 版本 ** 2.5 或更高版本 **
 *  已测试的最高版本为 **6.9.11**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/allow-html-in-category-descriptions/)
 * 标签
 * [categories](https://cn.wordpress.org/plugins/tags/categories/)[filter](https://cn.wordpress.org/plugins/tags/filter/)
   [html](https://cn.wordpress.org/plugins/tags/html/)
 *  [高级视图](https://cn.wordpress.org/plugins/allow-html-in-category-descriptions/advanced/)

## 评级

 5 星（最高 5 星）。

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

[您的评价](https://wordpress.org/support/plugin/allow-html-in-category-descriptions/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/allow-html-in-category-descriptions/reviews/)

## 贡献者

 *   [ Arno Esterhuizen ](https://profiles.wordpress.org/arnoesterhuizen/)
 *   [ timmmy ](https://profiles.wordpress.org/timmmy/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/allow-html-in-category-descriptions/)