how to find the id of a page in wordpress

How To Find The id Of A Page In WordPress

In this article, I’m going to show you how to find the id of a page or post in WordPress. Every page, post, image, custom post type, and anything else like that in WordPress has its own id that is used by WordPress to identify everything.

And most of the time, you don’t really need to think about the id, it’s just there making everything work. But, occasionally, if you’re doing certain things with certain plugins, you might need to enter the id of a specific page or post.

So in this article, I’m going to show you the easiest way to find that id without even needing to install any additional plugins.

How To Find The Page id In WordPress

To find the page id, you’ll need to open up the editing screen of the page you need the id of. You can do this by either clicking on “Pages” in the left hand side menu of your WordPress dashboard…

how to find page id wordpress

And then hovering over the page you want the id of, and clicking “Edit” just like you normally would.

how to get page id in wordpress

Or, if you’d prefer, you could go to the page on the front end of your site while logedd in to WordPress, and then click “Edit Page” in the menu across the top of the screen.

how to know page id in wordpress

Now, regardless of how you got here, you will be in either the Gutenburg or classic WordPress editor ready to edit the page just like this:

how to check page id in wordpress

But to find the page id, you don’t actually have to edit the page, you just need to look at the URL in your browser’s address bar to find it.

The url you will see when editing a page will be something like this:

https://yourdomain.com/wp-admin/post.php?post=123&action=edit

And the number in that URL will be the id of that page. So, for example, if you look at my URL bar, you will see that the id of the page I’m editing is 259 :

how to see page id in wordpress

And that’s all there is to it! Now you can find the id of any page in WordPress just by going into the editor and looking at the URL!

I should also mention that the page id won’t necessarily be a three digit number. For example, the id of this article that I’m writing right now on hitechweirdo.com is 25087 because this website has way more content on it than the demo website I was using for the demonstration.

So I can’t say for sure how long your page id will be, but it will just be whatever string of numbers you find in the URL.

How To Find The id Of A Post In WordPress

And it’s really the exact same process to find the id of a post, all you have to do is click on “Posts” in the left hand side menu of the WordPress dashboard.

wordpress how to get page id

And then hover over the post you want the id of and click “Edit”.

how to get wordpress page id

Or, open the post on the front end of your site while loged in to WordPress and click “Edit Post” across the top of the screen.

how to get the page id in wordpress

Then, regardless of how you got there, you will now be able to find the id of the post in the URL just like it is with pages:

how to find wordpress post id

So hopefully you found this quick tip helpful, and if you want to see more articles like this, be sure to take a look at the Blogging and Online Business category on our site for heaps more content about WordPress and other things relating to online business.

Similar Posts

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.