Sometimes when you are working with WordPress, you will need to know the id of a page or post. This could be for a piece of custom code, a plugin, or perhaps some kind of third party service.
Whatever the reason, finding the id of a page or post in WordPress is pretty simple.
To find the id of a WordPress page, open the page from the WordPress dashboard and copy the number found in the URL after post=. For example, yourwebsite.com/wp-admin/post.php?post=1234. This number, 1234, is the ID of your page or post.
But don’t worry, below I will show you to get this number step by step for you!
How To Find Your WordPress Page ID
The most common use is finding the id of a WordPress page. As I mentioned, this is pretty simple, so don’t worry. You don’t need to do anything technical or learn how to code!
To find your WordPress page id follow these steps:
- Log into the WordPress dashboard
- 2. Navigate to pages
3. Find the page you want to know the id for
4. From the Pages list, hover over the page with your cursor until you see the option to ‘Edit’ the page, then click ‘Edit’.
6. Copy the number highlighted in the below screenshot, this is the id of your page
How To Find Your WordPress Post ID
Finding the post id is the same process. Follow these steps the locate your WordPress post id:
- Access your WordPress dashboard
- Navigate to Posts
- Locate the post you want to know the id for
- From the Posts list, hover over the post with your cursor until you see the option to ‘Edit’ the page, then click ‘Edit’.
5. Copy the number highlighted in the below screenshot, this is your post id
Well, that was simple, told you!
Now that finding the page or post id is no longer an issue for you, how about tackling caching next with our guide on How To Flush Your Websites Cache.