Are you wondering how to get post, category, tag, comments, or user ID in WordPress easily? This article will give a step-by-step guide, let’s check them out.
What is the ID of WordPress Post, Category, Tag, Comments, or User?
The ID is a unique number that is created when you upload, publish, generate any items in WordPress. This ID is used to query, identify and read the item for display from the database. The ID is displayed for almost everything such as posts, pages, categories, tags, users, media uploads, menus, and comments.
Sometimes, you will need to find an ID number that supports you to enable or disable certain functions in WordPress themes and plugins that you are using.
How to find your Post ID/ Page ID?
In WordPress, you can use posts and pages to add rich content to your website. Sometimes, it is certain that you want to filter your posts and pages. In such a situation, you can need to get your post and pages IDs. In order to find a post ID in WordPress, you can track the following steps.
First of all, go to the Posts > All Posts page. And then, hover your mouse over the post title that you want to get the ID.
By using this way, you will see that your post edit URL will be displayed at the bottom left-hand corner of the current page. Now, have a look at the number that appears between ” post=” and “&action“. This number is also the ID of this post.
In our example, 535 is the WordPress post ID.
In addition, you can also see your WordPress post ID by opening this post to edit. The post edit URL will display in your browser’s address bar.
Similarly, if you want to find your WordPress page ID, you can easily use this method. However, initially, you have to go to the Pages > All pages in your dashboard instead of posts.
As the screenshot below, the ID of the About page is 255.
How to find your Categories ID and Tag ID?
In WordPress, categories, and tags play a crucial role in grouping and sorting your content. Thanks to that, readers will quickly find the content they are looking for.
In some cases, you may need to get a category and tag ID to add a plugin feature. Getting a WordPress Category ID, tag ID is not different from finding a post ID.
You just go to Posts > Categories from your dashboard. Then, you will see a list of your categories, let’s hover your mouse over the category title that you are finding the ID.
After that, the category edit URL will showcase on a popup box at the bottom of your screen.
Now you can see the category edit URL appear on a popup box at the bottom left corner of your screen.
Your category ID is located between “category&tag_ID=” and “&post_type“. In our example, the WordPress category is 33.
Moreover, when you can click on the Edit link below the category title. You will see the same URL that appeared at the bottom of the screen when you hovered your mouse over on your category title.
Now, you can find the tag ID by using the same process that you did to get post/ page and category IDs. And you have to Posts > Tags, then hover your mouse over the tag title to get the tag ID that will appear at the bottom of the screen.
In the URL, the special number between “tag&tag_ID=” and “&post_type” is the tag ID.
As a screen below, the tag ID is 42.
How to find a comment ID?
If you want to find a comment’s ID, you just go to the Comments section from your dashboard. Then, you will see a list of comments on your site.
Let’s hover your mouse over the Edit link that is under the comment you want to get the ID. Immediately, you will view the comment edit URL at the bottom of the screen.
The WordPress comment ID is displayed at the end of the URL, after the “editcomment&c=“. In the below screenshot, our comment ID is 434901.
Just similar to posts, pages, categories, and tags, you can open the comment editor page to get your comment ID in your browser’s address bar.
How to find a user ID?
To find a user ID, you just go to the Users > All Users page in your WordPress admin panel. Then hover your mouse over the user name that you want to seek the ID. WordPress will display the user edit URL at the bottom left corner of your screen.
The user ID will be right between “user_id=” and ” &wp” . In our case, the User ID is 2.
Additionally, you can click on the Edit link under a user name to see the user ID in the browser’s address bar.
Final Words
We have provided you with the simplest method to get post, category, tag, comments, and user ID in WordPress. Hope that this article handled your problems as well as gave you a lot of useful information. In case you have any questions, please leave a comment below, we are willing to support you as soon as possible.
Moreover, have you owned a beautiful and professional website? If not, don’t ignore our Free WordPress Themes to explore a wide range of amazing designs.
- What are joomla tags and how are the used? - November 3, 2024
- Why and how to create hidden menu items in Joomla? - October 31, 2024
- How to publish smartslider 3 to joomla 4? - October 31, 2024
Recent Comments