Categories
WordPress

How To Find Your Page and Post ID in WordPress

WordPress assigns ID numbers to every page and post, even comments, categories, and more. Part of the reason is quite rudimentary that has to do with storing and fetching information in & from the databases.

Knowing ID numbers can also help you tweak things from a coding perspective, and for some intents & purposes, even allow you to exclude specific pages or posts from plugins or widgets. Obviously though, a prerequisite would be to get your hands on the ID numbers in the first place.

How To Find a Page ID Number in WordPress

Believe it or not, there are many ways to obtain a page ID number (same for a post). What I’ll discuss though, is one of the most commonly known methods, that is, grabbing page ID from the URL — when logged into WordPress. Follow the steps below to learn how.

Step 1: Head over to your pages from your WP dashboard.

pages in wordpress
As your first step, go to your pages — after you’ve logged into WP.

Step 2: Hover your mouse over to the “edit” option for the page you need the ID for, or click on it, to properly open the page. Either way, what you’re looking for is the URL. (see image below for reference).

mouse hover over the edit option in pages
When you hover your mouse over to the edit option, your browser will display the URL at the bottom left corner.

Step 3: When you have the URL information available, what you’re looking for is the number that follows post=. In my example, I have been using the Contact Feed The Curiosity page, and therefore, its page ID is 25885. (See the URL that’s displayed in step 2’s screenshot).

How To Find a Post ID Number in WordPress

The technique to find your post ID is exactly the same; except, instead of pages, you’ll head over to posts.

Regardless, if sequential instructions are what you prefer for finding WordPress post ID, follow the steps below.

Step 1: Head Over to your posts, and find the article you need the ID for. As an example (screenshot to follow), I will be using my what graphics card do I have piece.

wordpress posts
As your step 1, navigate to your posts, and find the article for which you want the ID.

Step 2: Next, either click or simply hover your mouse to the edit option displayed below your post. Essentially, what you’re looking for is the URL information — because that’s where your ID will be revealed.

a mouse hover on one of the wordpress post's edit option
As demonstrated, at the end of the day, you need the URL information.

Once you have the URL, look for the number that follows post=. That number, is your WordPress Post ID.

You May Also Want to Check Out:

In Summary

Finding out the WordPress page or Post ID is not as daunting as one may imagine. With a few simple clicks, you’re on your way to grab that information, and use it when handling coding requirements, or when dealing with plugins, widgets, or what have you.