WordPress category ID

Last updated on November 28, 2011. Tags: ,

Category IDs are numerical values that WordPress assigned to all categories. Each category has a unique category ID. While you can change the name, description and slug of a category anytime, you cannot change the ID assigned to a category unless you edit the database, which is not advisable unless you really know how to do it.

If you are using WordPress' default URL structure, the category ID can be found at the end of the category page's URL. It's in the form of http://domain.com/?cat=1; in this example, 1 is the category ID.

If you configured your permalinks in a way that the category ID is not visible in the URL, you can still see it in your dashboard. Click on the "Categories" link under the "Posts" header to open the add/edit category interface shown below.  Then you can get the category ID by hovering the mouse pointer on that category in the category list and checking the number at the end of your status bar.

category id

Knowing the category ID can be useful in some WordPress tweaks and customization such as preventing certain categories from showing in the category list.

Posted by Greten on November 29, 2009 under Definitions, WordPress

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • Technorati

Related Posts

You might also be interested (randomly generated):

Post Comments





Comment Rules and Reminders

  • The links to the commentator's e-mail do not have nofollow tag. However, I will be very strict in approving comments.
  • When you comment, please say something that indicates that you indeed read my post. If your comment is a general statement that can fit to any blog post about any topic, it will be regarded as spam.
  • What you write in the name field may include keywords to your website provided that (1) it's only up to four words long and (2) at least one of these four words is your first name or nickname. I rather reply to Bob or to Joe Smith than to Online Marketing Tips.
  • Please double check your comment before clicking the "Post" button. Once you clicked it, there will be no way for you to edit your comment.
  • Fields marked with asterisks (*) are required. Your email will never be displayed in public.