WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Beginners Guide» How to Find Post, Category, Tag, Comments, or User ID in WordPress

How to Find Post, Category, Tag, Comments, or User ID in WordPress

Last updated on August 31st, 2019 by Editorial Staff
49 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Find Post, Category, Tag, Comments, or User ID in WordPress

Have you ever found yourself in a situation where you had to know a specific WordPress post ID, page ID, category ID, tag ID, comment ID, or user ID?

While working on WordPress, you may need these IDs to add certain features on your website. Some WordPress themes or plugins may ask you for these IDs to enable or disable certain functions.

If you are wondering what an ID is, it is a unique number which identifies a particular item in your WordPress database. Each post, page, category, tag, comment, and user in WordPress have their unique ID.

In this article, we will show you how to find a post, category, tag, comments, or user ID in WordPress.

Finding WordPress Post ID, Category ID, Tag ID, Comment ID, User ID Easily

How to Find Your WordPress Post ID and Page ID?

In WordPress, posts and pages are two main ways to add content. The posts are mainly used for timely articles, whereas pages are used for static content.

Sometimes you may want to filter your posts and pages or exclude them from certain features. In such a scenario, you may need your post and page IDs.

Let’s start with looking at how to find a post ID in WordPress.

From the WordPress admin panel, go to Posts » All Posts page and locate the post whose ID you need.

The easiest way to view your post ID is to hover your mouse over the post title.

When you do that, your post edit URL will appear at the bottom left-hand corner of your screen. Now, take a look at the number that comes between ‘post=’ and ‘&action.’

WordPress Post ID

You got it! That’s your WordPress post ID.

It is 5 in the example above.

You can view your WordPress post ID also in the post editor screen. When you open a post to edit, the post edit URL will appear in your browser’s address.

WordPress Post ID in Web Browser's Address Bar

It is the same URL which had appeared in the popup box when there was mouse hover on the post title.

So the number that comes after ‘post=’ and before ‘&action’ is the post ID.

Now you can use the same method to find your WordPress page ID as well. The only difference is that you have to go to the Pages menu instead of Posts.

WordPress Page ID

For example, the page ID in the above screenshot above is 32.

How to Find Your WordPress Category ID and Tag ID?

Categories and tags are used for sorting content in WordPress.

Sometimes, you may need to find a category or tag ID to add a plugin feature.

Finding a WordPress category ID, tag ID or another custom taxonomy ID in WordPress is very similar to finding a post ID.

Let’s take a look at it.

First, you need to visit Posts » Categories from your WordPress admin panel. When you can see the list of your categories, hover your mouse over the category title whose ID you are looking for.

Now you can see the category edit URL appear on a popup box at the bottom left corner of your screen.

WordPress Category ID

Your category ID is right there in the URL. It is the number that comes after ‘category&tag_ID=’ and before ‘&post_type’. In the screenshot above, your WordPress category ID is 2.

You can also view your WordPress category ID by editing it. Simply open a category to edit, and you’ll see the category ID in the browser’s address bar.

WordPress Category ID in Web Browser's Address Bar

It is the same URL which appeared when there was mouse hover on your category title. It means that the category ID is the number between ‘category&tag_ID=’ and ‘&post_type’, which is 2.

You may notice that even though we are editing a category, WordPress still displays category ID as tag_ID. Don’t get confused by this.

All categories and tags are actually terms inside a WordPress taxonomy. The same editor handles them.

Now you can find your WordPress tag ID also in a similar way. Visit Posts » Tags, and then hover the mouse over the tag whose ID you want to view.

Once done, your tag edit URL will appear at the bottom left corner of the screen.

WordPress Tag ID

In the URL, the unique number between ‘tag&tag_ID=’ and ‘&post_type’ is your tag ID. In the screenshot above, 9 is your tag ID.

How to Find a Comment ID in WordPress?

To find a comment’s ID, the first thing you need to do is go to the Comments section in your WordPress admin panel. After that, you will see a list of the comments on your site.

Simply hover your mouse over the ‘Edit’ link under the desired comment. Next, you will see the comment edit URL at the bottom left corner of your screen.

WordPress Comment ID

Your WordPress comment ID is right there at the end of the URL, after the ‘editcomment&c=.’ In the above screenshot, your comment ID is 4.

Similar to posts, pages, categories, and tags, you can also open the comment editor page to view your comment ID.

On the comment editor page, you can find your comment ID at the end of the comment edit URL.

WordPress Comment ID in Web Browser's Address Bar

How to Find a User ID in WordPress?

Just like other items we discussed above, you can also find a user ID by looking at the user editing URL or by editing it.

Go to Users » All users and hover your mouse over the user name. WordPress will show the user edit URL in a small popup box at the bottom left corner of your screen.

WordPress User ID

The number that comes after ‘user_id=’ and before ‘&wp’ is your WordPress user ID. In the screenshot above, the user ID is 3.

You can find a user ID also in the user editor page. Click on the Edit link under a user name. Next, WordPress will open the user’s profile, and you can get the user ID from the browser’s address bar.

WordPress User ID in Web Browser's Address Bar

If you are trying to find out your own user ID, then WordPress will open the profile editor without a user ID in the URL.

To find your own user ID, go to Users » All Users. WordPress will display a list of authors with the number of posts they have written next to it.

Hover the mouse over the number of posts you have written, and you will be able to see your author edit URL at the bottom left corner of the screen. The URL includes your author ID.

Your User Profile ID in WordPress

Alternatively, you can click on the number of posts you have written, and then WordPress will redirect you to a page that lists all posts written by you. Here, you can get the user ID from browser’s address bar because it will be displayed as an author, like this:

Your User Profile ID in WordPress - On Browser's Address Bar

In this example, the user (author) ID is 1.

We hope this article helped you find the post, category, tag, comments, and user ID in WordPress. You may also want to see our guide on how to do basic image editing in WordPress (crop, rotate, scale, flip).

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

49 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

17 Comments

Leave a Reply
  1. Diego Weissel says:
    Apr 25, 2018 at 10:48 am

    I wish they add a feature of getting ID just like name in many places on dashboard, heavy to load then? too may calls?

    Reply
  2. Erez says:
    Feb 3, 2017 at 4:57 pm

    How did I forget about GET url that displays the IDs?

    thank you!

    Reply
  3. Edward says:
    Mar 14, 2016 at 10:34 am

    You didn’t show how to find the tag’s id. Is anyone know how to find the tag id?

    Reply
    • WPBeginner Support says:
      Mar 14, 2016 at 4:03 pm

      Please see our guide on How to find post, category, tag, comments, or user ID in WordPress.

      Reply
  4. AnnieR says:
    Feb 29, 2016 at 1:50 pm

    I’m trying to find a user id, this is what my url looks like when I’m editing the user.

    wp-admin/profile.php?wp_http_referer=%2Fwp-admin%2Fusers.php

    Can’t see anything in there that might be a user id!

    Reply
  5. Salvatore lobello says:
    Dec 27, 2015 at 2:48 am

    I found the video very helpfut.

    Reply
  6. Vinay says:
    Nov 10, 2015 at 6:49 am

    Hey guys,

    How to find the siteID of a wordpress site?

    Thanks in advance.

    Reply
    • Erez says:
      Feb 3, 2017 at 4:59 pm

      just in case you still need it:

      look at this plugin: Wp Show Site ID

      Reply
  7. Ejaz Khan says:
    Jun 19, 2014 at 8:59 am

    Thanks so much,

    Reply
  8. Bikramjit Singh says:
    Jun 5, 2014 at 5:46 am

    Hi,,How can i find a particular post in the post list if i have the post ID number?

    Reply
  9. O G says:
    May 14, 2014 at 9:10 am

    Hi. It seems that you can’t find your own user ID because what shows up in the address bar is this: “…/wp-admin/profile.php?wp_http_referer=%2Fdemo%2Fdynamik%2Fwp-admin%2Fusers.php

    Looks like you have to login with another username to check your own user id.

    Reply
  10. Arup Ghosh says:
    Dec 5, 2013 at 3:37 pm

    Great Post, I was wondering to check the IDs of categories.

    Reply
  11. Jean says:
    Jul 12, 2013 at 5:24 am

    Note that finding the user id via ‘Edit User’ won’t work unless he has written at least one post.

    Reply
  12. Abdul Rahim says:
    Jun 5, 2013 at 12:34 am

    Very nice post, If i want to change any post or page id, then what I need do?

    Reply
  13. Robert Neu says:
    May 29, 2013 at 11:59 am

    Nice post. :) You can also install this plugin to highlight the IDs more clearly:

    http://wordpress.org/plugins/reveal-ids-for-wp-admin-25/

    Reply
    • Oliver Schlöbe says:
      May 29, 2013 at 3:00 pm

      Thanks for suggesting my plugin. :)

      Reply
    • Srihari Thalla says:
      Jul 24, 2013 at 3:43 am

      Thanks for the Plugin.

      Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
PushEngage
PushEngage
Increase your website traffic & revenue with push notifications. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
Advanced Coupons
Advanced WooCommerce Coupons
Get 50% off the Advanced Coupons smart coupons plugin for WooCommerce.
ProfilePress
ProfilePress Coupon
Get 20% OFF on ProfilePress WordPress ultimate user and profile plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.