How to find page ID or page ID in WordPress

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!

How to find page ID in WordPress

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:

how to find page ID in WordPress

It will look something like post.php?post=[SOME NUMBER]. That is your needed page ID (in this example page ID is 16).

How to find post ID in WordPress

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:

where to find post id in wordpress

As you see, post ID is defined the same way as page ID – …?post=[SOME NUMBER].

How to find category ID, tag ID or any other taxonomy ID in WordPress

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:

where to find category ID or tag ID in WordPress (any taxonomy ID)

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.