Sometimes you might need to add page ID or post ID to WordPress shortcode or to a custom function. But how and where to find page or post ID in WordPress website?
It’s actually easier than you think!
To find page ID in WordPress you need to open page list in WordPress admin panel.
Click Pages >> All pages.
Find the page you want to get the ID of, and click it to edit.
Once you’re in the page Edit form, look at it’s URL at the top:
It will look something like post.php?post=[SOME NUMBER]. That is your needed page ID (in this example page ID is 16).
You can locate post ID in WordPress the same way as page ID. You just need to go to Posts >> All posts, and open the post to edit.
Look at the post edit URL, and you’ll find out the actual post ID in it:
As you see, post ID is defined the same way as page ID – …?post=[SOME NUMBER].
Every taxonomy edit URL contains it’s ID. So if you want to find out the taxonomy ID, you need to open it’s page in WordPress admin panel
Taxonomy ID is always present in it’s URL when you’re editing it:
As you see, taxonomy URL has taxonomy type (in the example it’s category). And it’s ID is shown as tag_ID (in the example it’s 3).
Every taxonomy, post or page ID can be easily found just by opening it in WordPress admin panel. It’s always in the URL.