Skip to content

How To Find a Page, Post, Image, Template or Term ID

In WordPress everything has an “ID”. Pages, tags, categories, menus…etc all have unique “ID’s” which is how they are referenced and saved in the database. This is referred to as Global Unique Identifier or guid for short. Sometimes you may need to know an ID to reference it in a shortcode, setting or custom function.

Find a Page or Post ID

There are different ways and plugins that can be used to locate a post or page ID, but the easiest method is to simply log into WordPress and click to edit the page or post you want to locate the ID. Once the edit window opens you can look at the browser address bar where you will see the ID in the format post={id}.

In this case the ID for this specific template would be 1155.

Find an Image (attachment) ID

Go to your Media library and click to “edit” the image you want to get the ID of. The image/attachment ID can then be located in the browser address bar in the format post={id}

So in this example the image ID would be 5285.

Find a Term (Category) ID

Locating the term ID is basically the same as locating a post ID. You would go to the term/category edit screen and look at the URL however instead of post=”ID” you are looking for tag_ID=”ID”:

Back To Top