WordPress Category Functions

Beginner
5 min read
Updated: Nov 2026
16 function guides
Function index

About This Index

This page is the WordPress Category Functions index. Each row links to a full guide with syntax, examples, and FAQs.

Learn how categories, tags, and taxonomies work on WordPress Category. Use this page when you need one function, such as the_category(), single_term_title(), or wp_tag_cloud().

Beginner path.

Start with the_category() and the_tags(). Then learn single_term_title(), term_description(), wp_list_categories(), and wp_tag_cloud().

How to Call a Category Function

Post term tags go inside The Loop. Archive title tags go in archive templates. Functions that start with the_ print. Functions that start with get_ return a value.

WordPress
<?php while ( have_posts() ) : the_post(); ?>
  <p><?php the_category( ', ' ); ?></p>                 <!-- prints category links -->
  <p><?php the_tags(); ?></p>                          <!-- prints tag links -->
  <?php $list = get_the_term_list( get_the_ID(), 'genre' ); ?>  <!-- returns links -->
<?php endwhile; ?>

<h1><?php single_term_title(); ?></h1>                 <!-- archive page title -->
<?php wp_tag_cloud(); ?>                                  <!-- tag cloud -->

WordPress Category Functions Table

All function guides in this WordPress category series (16 tutorials).

Post terms (in The Loop)

6 functions

Show the categories, tags, and other terms of the current post.

FunctionDescriptionTutorial
the_category()Print the categories of the current post as links or a list.Read guide
the_tags()Print the tags of the current post as links with optional text around them.Read guide
the_terms()Print the linked terms of a post for any taxonomy.Read guide
get_the_term_list()Return linked terms of a post for any taxonomy as one HTML string.Read guide
the_taxonomies()Print all taxonomies and terms of a post in one short sentence.Read guide
the_category_rss()Print the categories of the current post inside an RSS or Atom feed.Read guide

Archive titles & descriptions

6 functions

Show the name and description of a category, tag, or term on an archive page.

FunctionDescriptionTutorial
single_cat_title()Print or return the title (name) of the current category archive.Read guide
single_tag_title()Print or return the title (name) of the current tag archive.Read guide
single_term_title()Print or return the title of a category, tag, or custom taxonomy archive.Read guide
category_description()Return the description of a category (current archive by default).Read guide
tag_description()Return the description of a tag (current archive by default).Read guide
term_description()Return the description of any term: category, tag, or custom taxonomy.Read guide

Lists, dropdowns & clouds

4 functions

Build category lists, select boxes, and tag clouds for sidebars and forms.

FunctionDescriptionTutorial
wp_list_categories()Print or return an HTML list of categories with links.Read guide
wp_dropdown_categories()Create an HTML select box (drop-down) of categories.Read guide
wp_tag_cloud()Fetch tags and print a tag cloud with different font sizes.Read guide
wp_generate_tag_cloud()Build tag cloud HTML from an array of term objects.Read guide

Frequently Asked Questions

They are template tags that work with categories, tags, and other taxonomy terms. They show the terms of a post, the title and description of an archive, and lists, drop-downs, and tag clouds.
Categories are broad groups and can have parents. Tags are small keywords without a hierarchy. Custom taxonomies are your own groups, such as genre or topic. All of them are made of terms.
Use the_category() to print category links. Use the_tags() for tags. Use the_terms() for any taxonomy, including custom ones.
Use single_cat_title() on a category archive, single_tag_title() on a tag archive, and single_term_title() for any taxonomy archive.
Use wp_list_categories() for a list, wp_dropdown_categories() for a select box, and wp_tag_cloud() for a tag cloud.
Start with the_category() and the_tags(). Then learn single_term_title() and term_description(). After that, open wp_list_categories() and wp_tag_cloud().

Start with category_description()

Get the description of a category, the first guide in the sidebar.

category_description() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

15 people found this page helpful