Pop Up Image

Get the Full PDF guide to creating an online store with WooCommerce (88 pages) for FREE

A comprehensive database for everything WordPress related.

TOP
WPKlik Logo Newsletter

Sign up and receive a free copy of How to Create an online Store with WooCommerce (full guide)

Find-wp-page-and-id

Easy Tips to Help You Find Your WordPress Page and Post ID

Getting Started

You probably already know that obtaining IDs for your WordPress pages, posts, tags, categories or media items can be very handy at times. This piece of information can prove integral when performing certain tasks, however it does take a bit of know-how in order to find it. In this article we’ll show you how to quickly find your WordPress page and post ID.

Finding Your Page ID

As you may know, WordPress classifies all the content. This means that every piece of content has its unique ID. Obtaining your page ID is quite a straightforward process. It consists of two simple steps. First, from your WordPress admin area, navigate to Pages. Then click Edit beneath the page you wish to find the ID for.

page-id-wordpress

All that’s left to now is to check the page URL, locate the post=number (in our example screenshot it’s 31).

wordpress-page-and-pos-id

As you can clearly see, the process is very simple. The best thing is, the same process applies to posts, tags, categories and media items.

Getting Your Post ID

You were able to see from the previous example how easy it is to find your page ID. The same process applies to posts. Simply navigate to Posts from your backend, and click edit under the desired post.

post-id-wordpress

Same as in the case of page ID, check the post URL and you will find your post ID.

find-wordpress-id

Finding IDs for Tags, Categories and Media Items

Now that you have seen how to quickly find your WordPress page and post ID, we’ll move on to post tags, post categories and media items.

The method is almost identical for tags and categories, with media item IDs having only one slight distinction. Namely, for post tags and categories, you should click Edit, the same as for pages and posts.

However, media items have one minute difference. Once you locate the desired media item, just click on it.

tags-id-wordpress

The remainder of the process for tags, categories and media items is nearly the same.
For tags, locate the tag_ID=number in the URL (tag_ID=1 in our example).

wordpress-categorie-id

Moreover, absolutely the same applies for categories, as you can see from our screenshot below.

media-items-id

As for the media items, check the URL for item=number (item=78 in our example).

post-id

Conclusion

Obtaining page and post IDs, as well as IDs for post tags, categories and media items, can prove very significant. Namely you could need them when you wish to query or target specific content. However, this is exactly why finding them is very easy. Hopefully this article helped you find your WordPress page and post ID the easy way.

We hope that you found this article to be helpful. If you liked it, please feel free to check out some of these articles as well!

Newsletter

WordPress perfection at your fingertips.

If you enjoyed this article, feel free to subscribe to our newsletter using the form below. You can also follow us on Facebook and Twitter and subscribe to our YouTube channel for WordPress video tutorials.

Leave a Reply