How to show Category description with HTML in Your WordPress Theme

This tutorial will help you how to show Category description with HTML in your WordPress themes by using long description with HTML code.

By using the category description function. You can put this in your theme wherever you’d like – for example, at the top of your category template (usually category.php or archive.php or custom tag).

<?php echo category_description( $category_id ); ?>

Example for show WordPress category description

Here’s a quick example. You can insert category description box and put the code above in my archive.php file.

Description in WordPress category

Example for Category description on ThemeVina.Com

Here is example in WordPress themes category on this site

Show Category description with HTML in Your WordPress Theme

Use HTML in Your Category Description

Default you cannot use HTML in your category description box. You need put the following code in your functions.php file after the opening <? php. (Appearance > Editor > Theme Functions – functions.php)

remove_filter('pre_term_description', 'wp_filter_kses');

Why Use a Category Description

If you are SEOer or Webmaster. I sure that you will need category description for your site, but it may be able to liven up your site (especially if you use HTML), give your users useful information, and of course, it may even help out the SEO of your category pages.

Thanks and Good luck.

Share this :

Comments are closed.

Related post

Free Responsive Website templates

ThemeVina is Best site for free sharing and download Wordpress themes, Joomla templates, Responsive website templates and more HTML templates.

All template in Site are free. You can download and install for your site.

Contact us

  • Brand: Theme Vina
  • Email: admin@themevina.com
  • Website: www.themevina.com
  • Address: 367 Tran Hung Dao Street
  • Location: Thai Binh City, Thai Binh, Viet Nam

Newsletter