Here are two ways how to get post id in WordPress:
FIRST:
1. Just go to your WordPress dashboard. Then go to “posts”.
2. To find out the ID number of your post, just hover your mouse on the particular post from the list.
You can now see the post ID number of your post at the bottom of your window.
For example, if your selected post URL is this: http://yourdomain.com/wp-admin/post.php?action=edit&post=15. It means the post id of that post is "15".
2. To find out the ID number of your post, just hover your mouse on the particular post from the list.
You can now see the post ID number of your post at the bottom of your window.
For example, if your selected post URL is this: http://yourdomain.com/wp-admin/post.php?action=edit&post=15. It means the post id of that post is "15".
1. First download Reveal ID plugin.
2. Then install the plugin.
3. After installing, you need to configure it.
4. After configuring the plugin, an extra column in the Dashboard will reveal the Post ID together with each post.