As you work through Genesis Blueprints, you will sometimes need to find the post id of the post you are working on. The post id will uniquely identify that post from all other pages and posts on the site. Being able to locate a post id is a very useful skill.
In this short tutorial I am using the Google Chrome browser. If you are not using Google Chrome as your browser you may not see exactly the same screens that I showing in the screenshots below, however they will be similar.
- Create The Post And Save It
- Once you have created and saved the post, click on the View Post button to see its published view.
- View The Post Source Code
- Now that you are are looking at the post in published view, you can right-click on it and select View Page Source.
- Find The Body Tag
Now, looking at the post source – don’t be put off – it does look like a lot of gobbledygook, just scroll down until you see the body tag. The body tag will be located on the left of the page so just scan down the left hand side to spot it quickly.
Then within the body tag, locate the class that identifies the post uniquely. It will be in the format postid-number.
See the screenshot below. In this example the unique class name is postid-9386. You just need to locate yours.
Once you have found it, make a note of it for use when required.