Show Category IDs

By default when you view the list of post categories or WooCommerce product categories, WordPress doesn’t show the IDs. But sometimes, you may need those IDs, say when you want to put them in a shortcode.

In this tutorial, we will build a small plugin that will show the category IDs on post and product category list.

Plugin Header

As usual, let’s start by writing a plugin header so that WordPress treats our file as a plugin.

The Plugin Code

The plugin is really simple and self-explanatory, so I am not breaking it down further.


You may download the code from GitHub.

Leave a Reply

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