★ Black Friday★ Cyber MondayWeb hosting up to 85% off, checked on each host’s own siteGrab the deals →

How to Add HTML and Scripts in WordPress Category Descriptions (2026)

Share

Can you add HTML and scripts to WordPress category descriptions? Category and tag pages can rank well in Google, but only if they offer more than a list of posts. A good intro with links, an image or a short guide turns a thin archive into a useful landing page. Here is how to add HTML to WordPress category descriptions in 2026, safely, and how to show it in your theme.

Add HTML in WordPress category descriptions

Quick answer: On a normal single-site WordPress install, administrators can already use HTML such as links, bold text, lists and images in category and tag descriptions under Posts > Categories > Edit. Users without the “unfiltered_html” capability, such as editors on multisite, have tags stripped; a small code snippet can allow more HTML. Your theme must call the_archive_description() (or the Term Description block) to display it.

Why add HTML to category descriptions?

  • Write a helpful introduction for each topic.
  • Link to your best “start here” posts in that category.
  • Add a featured image or comparison table.
  • Give search engines more context, so category pages can rank for broad topics.

How to add HTML to a category description

  1. Go to Posts > Categories (or Tags) and click Edit under the category.
  2. In the Description box, type your text with HTML, for example:
<p>Our <strong>WordPress tutorials</strong> help you build a faster site.</p>
<ul>
  <li><a href="/archives/wordpress-speed/">Speed up WordPress</a></li>
  <li><a href="/archives/wordpress-security/">WordPress security</a></li>
</ul>
  1. Click Update and view the category page.

Some SEO plugins, including Rank Math and Yoast, replace the plain box with a visual editor, which makes formatting easier.

If your HTML is stripped

WordPress removes HTML from descriptions for users who lack the unfiltered_html capability (for example editors on multisite, or sites where DISALLOW_UNFILTERED_HTML is set). To allow safe HTML for all users who can edit terms, add this to a small custom plugin or your child theme’s functions.php:

foreach ( array( 'pre_term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_filter_kses' );
    add_filter( $filter, 'wp_kses_post' );
}

This allows the same safe HTML as post content (links, images, lists) but still blocks scripts. Only allow full scripts if every editor is fully trusted.

How to display the description in your theme

  • Classic themes: add <?php the_archive_description( '<div class="taxonomy-description">', '</div>' ); ?> to archive.php or category.php.
  • Block themes: edit the Archive or Category template in the Site Editor and add the Term Description block.
  • Most modern themes, including Kadence and Astra, already show it under the archive title.

Style it with a little CSS; here is how to add custom CSS in WordPress.

Category page SEO tips

  • Keep category descriptions original, 100 to 300 words, and useful.
  • Do not create many overlapping categories. Here is how to convert categories to tags when needed.
  • Noindex paginated archive pages if they add no value; see how to noindex archive subpages.

FAQ

Can I add images to a category description?

Yes. Upload the image to the Media Library, copy its URL and add an <img> tag, or use your SEO plugin’s visual editor.

Is it safe to allow scripts in category descriptions?

Only for trusted administrators. Scripts can be abused if a less trusted account is compromised.

Why is my category description not showing?

Your theme probably does not call the_archive_description(). Add it to the template or use the Term Description block.

Do you write category descriptions on your blog? Tell us in the comments.

Found this useful? Share it with someone who needs it.

Subscribe to our weekly tech newsletter

New tech guides, free tools and 2-minute fixes, once a week.

🎁 100 Tech Terms ebook comes free with every subscription.

Unsubscribe anytime. See our privacy policy.

Related Tech Guides

Leave a Reply

Your email address will not be published. Required fields are marked *

4 Comments

  1. I have been searching for this for long time and finally got it here. thanks for useful tips.

  2. Thanks for share this article.
    BTW, can you put some picture that show this code result. So, we can imagine to work with it.

    Thanks

  3. I have done this before and I hope this helps many who were wondering how it’s done. Thanks for sharing