How to determine a post, page, or category ID
Every time a post, page, or category is created, WordPress assigns it a unique ID number. Identifying an ID is quite simple. In this tutorial, we will be determining a post's ID, though the steps are the same for pages and categories as well.
Navigate to your WordPress Dashboard > Posts page.
Here, all of the posts you've created should be listed beginning with the most recent.
To find a specific post's ID number, hover your mouse over its post title.
As you hover, you'll notice a little box appears in the bottom-left corner of your screen displaying the link's complete URL. Your post's ID number is hidden within this URL.
For example, my post's URL looks like this:
Toward the end of the URL, you can see a bit of text that says "post=116".
This tells us the post ID number. This particular post has a unique ID number of "116".
That's it! The same steps can be used to determine a page or category ID as well.
Simply navigate to WP Dashboard > Pages and hover over a page's title URL to see its page ID.
Or, navigate to WP Dashboard > Posts > Categories and hover over a category title to see its category ID.
Don't see the URL appearing at the bottom of your screen when you hover over the post?
For some, the URL at the bottom-left corner of your screen may not appear. No worries! There's another way to determine a post, page, or category's ID.
Within the WP Dashboard > Posts screen where all of your posts are listed, simply click through to the edit screen of your post you'd like to find the ID of. Now, look up in your web browser's URL bar. Here, you should see the post's full URL which will include the "post=" text. Whatever number follows the "post=" text will be your post's ID number.
This is the same process for determining a page's ID (WP Dashboard > Pages) and determining a category ID (WP Dashboard > Posts > Categories).