WordPress Category ID: How To Easily Retrieve It

Steven2 responsesWordPress

While tweaking your WordPress theme, you may need to retrieve certain category IDs. (For example, to display posts differently if they are in a given category.)

It may take you only a couple seconds to find a category ID if you are an experienced WordPress user. However, I also have to think about all the people who are just starting using WordPress.

  1. In order to find the category ID of a given category, you must first log into WordPress admin area.
  2. Once logged in, you should navigate to Posts, then in Categories.
  3. The last step is to just put your mouse pointer on the Edit link related to the category of which you want to know the category ID, and take a look at your browser status bar (at the bottom of your screen). You will see a link such as: http://dukeo.com/wp-admin/categories.php?action=edit&cat_ID=1

There you go! Now you have your WordPress category ID.

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

2 Comments

  1. Paul Salmon

    This will definitely come in handy for those that will be creating pages or code that will target specific categories. I know when I started with WordPress I didn’t know an easy way of retrieving the IDs.

    1. I love these little snippets of code :)

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

No thanks, I have enough money