查找wordpress端口_如何在WordPress中查找帖子,类别,标签,评论或用户ID

查找wordpress端口

Have you ever found yourself in a situation where you had to know a specific WordPress post ID, page ID, category ID, tag ID, comment ID, or user ID?

您是否曾经遇到过必须知道特定WordPress帖子ID,页面ID,类别ID,标签ID,评论ID或用户ID的情况?

While working on WordPress, you may need these IDs to add certain features on your website. Some WordPress themes or plugins may ask you for these IDs to enable or disable certain functions.

使用WordPress时,您可能需要这些ID才能在网站上添加某些功能。 某些WordPress主题或插件可能会要求您提供这些ID,以启用或禁用某些功能。

If you are wondering what an ID is, it is a unique number which identifies a particular item in your WordPress database. Each post, page, category, tag, comment, and user in WordPress have their unique ID.

如果您想知道ID是什么,它是一个唯一的数字,用于标识WordPress数据库中的特定项目。 WordPress中的每个帖子,页面,类别,标签,评论和用户都有其唯一的ID。

In this article, we will show you how to find a post, category, tag, comments, or user ID in WordPress.

在本文中,我们将向您展示如何在WordPress中查找帖子,类别,标签,评论或用户ID。

Finding WordPress Post ID, Category ID, Tag ID, Comment ID, User ID Easily
如何找到您的WordPress帖子ID和页面ID? (How to Find Your WordPress Post ID and Page ID?)

In WordPress, posts and pages are two main ways to add content. The posts are mainly used for timely articles, whereas pages are used for static content.

在WordPress中, 帖子和页面是添加内容的两种主要方法。 这些帖子主要用于及时发布文章,而页面则用于静态内容。

Sometimes you may want to filter your posts and pages or exclude them from certain features. In such a scenario, you may need your post and page IDs.

有时,您可能希望过滤您的帖子和页面,或者将它们从某些功能中排除。 在这种情况下,您可能需要您的帖子和页面ID。

Let’s start with looking at how to find a post ID in WordPress.

让我们从如何在WordPress中查找帖子ID开始。

From the WordPress admin panel, go to Posts » All Posts page and locate the post whose ID you need.

在WordPress管理面板中,转到帖子»所有帖子页面,然后找到所需ID的帖子。

The easiest way to view your post ID is to hover your mouse over the post title.

查看帖子ID的最简单方法是将鼠标悬停在帖子标题上。

When you do that, your post edit URL will appear at the bottom left-hand corner of your screen. Now, take a look at the number that comes between ‘post=’ and ‘&action.’

执行此操作后,您的帖子编辑URL将显示在屏幕的左下角。 现在,看看介于“ post =”和“&action”之间的数字。

WordPress Post ID

You got it! That’s your WordPress post ID.

你说对了! 那就是您的WordPress帖子ID。

It is 5 in the example above.

在上面的示例中为5。

You can view your WordPress post ID also in the post editor screen. When you open a post to edit, the post edit URL will appear in your browser’s address.

您也可以在帖子编辑器屏幕中查看WordPress帖子ID。 当您打开帖子进行编辑时,帖子编辑URL将出现在浏览器的地址中。

WordPress Post ID in Web Browser's Address Bar

It is the same URL which had appeared in the popup box when there was mouse hover on the post title.

帖子标题上有鼠标悬停时,它是出现在弹出框中的相同URL。

So the number that comes after ‘post=’ and before ‘&action’ is the post ID.

因此,在“ post =”之后和“&action”之前的数字是帖子ID。

Now you can use the same method to find your WordPress page ID as well. The only difference is that you have to go to the Pages menu instead of Posts.

现在,您也可以使用相同的方法来查找WordPress页面ID。 唯一的区别是您必须转到“页面”菜单而不是“帖子”。

WordPress Page ID

For example, the page ID in the above screenshot above is 32.

例如,上面的屏幕截图中的页面ID是32。

如何找到您的WordPress类别ID和标签ID? (How to Find Your WordPress Category ID and Tag ID?)

Categories and tags are used for sorting content in WordPress.

类别和标签用于对WordPress中的内容进行排序。

Sometimes, you may need to find a category or tag ID to add a plugin feature.

有时,您可能需要查找类别或标签ID才能添加插件功能。

Finding a WordPress category ID, tag ID or another custom taxonomy ID in WordPress is very similar to finding a post ID.

在WordPress中查找WordPress类别ID,标签ID或其他自定义分类 ID与查找帖子ID非常相似。

Let’s take a look at it.

让我们来看看它。

First, you need to visit Posts » Categories from your WordPress admin panel. When you can see the list of your categories, hover your mouse over the category title whose ID you are looking for.

首先,您需要从WordPress管理面板访问帖子»类别 。 当您可以看到类别列表时,将鼠标悬停在您要查找其ID的类别标题上。

Now you can see the category edit URL appear on a popup box at the bottom left corner of your screen.

现在,您可以看到类别编辑URL出现在屏幕左下角的弹出框中。

WordPress Category ID

Your category ID is right there in the URL. It is the number that comes after ‘category&tag_ID=’ and before ‘&post_type’. In the screenshot above, your WordPress category ID is 2.

您的类别ID就在URL中。 它是在“ category&tag_ID =”之后和“&post_type”之前的数字。 在上面的屏幕截图中,您的WordPress类别ID为2。

You can also view your WordPress category ID by editing it. Simply open a category to edit, and you’ll see the category ID in the browser’s address bar.

您还可以通过编辑来查看您的WordPress类别ID。 只需打开类别进行编辑,您就会在浏览器的地址栏中看到类别ID。

WordPress Category ID in Web Browser's Address Bar

It is the same URL which appeared when there was mouse hover on your category title. It means that the category ID is the number between ‘category&tag_ID=’ and ‘&post_type’, which is 2.

与类别标题上的鼠标悬停时出现的URL相同。 这意味着类别ID是“ category&tag_ID =”和“&post_type”之间的数字,为2。

You may notice that even though we are editing a category, WordPress still displays category ID as tag_ID. Don’t get confused by this.

您可能会注意到,即使我们正在编辑类别,WordPress仍将类别ID显示为tag_ID。 不要为此感到困惑。

All categories and tags are actually terms inside a WordPress taxonomy. The same editor handles them.

所有类别和标签实际上都是WordPress分类法中的 术语 。 相同的编辑器处理它们。

Now you can find your WordPress tag ID also in a similar way. Visit Posts » Tags, and then hover the mouse over the tag whose ID you want to view.

现在,您也可以类似的方式找到WordPress标记ID。 访问帖子»标签 ,然后将鼠标悬停在要查看其ID的标签上。

Once done, your tag edit URL will appear at the bottom left corner of the screen.

完成后,您的标签编辑URL将显示在屏幕的左下角。

WordPress Tag ID

In the URL, the unique number between ‘tag&tag_ID=’ and ‘&post_type’ is your tag ID. In the screenshot above, 9 is your tag ID.

在网址中,“ tag&tag_ID =”和“&post_type”之间的唯一数字是您的标签ID。 在上面的屏幕截图中,9是您的标签ID。

如何在WordPress中找到评论ID? (How to Find a Comment ID in WordPress?)

To find a comment’s ID, the first thing you need to do is go to the Comments section in your WordPress admin panel. After that, you will see a list of the comments on your site.

要查找评论的ID,您需要做的第一件事是转到WordPress管理面板中的“评论”部分。 之后,您将在网站上看到评论列表。

Simply hover your mouse over the ‘Edit’ link under the desired comment. Next, you will see the comment edit URL at the bottom left corner of your screen.

只需将鼠标悬停在所需注释下方的“编辑”链接上即可。 接下来,您将在屏幕的左下角看到评论编辑URL。

WordPress Comment ID

Your WordPress comment ID is right there at the end of the URL, after the ‘editcomment&c=.’ In the above screenshot, your comment ID is 4.

您的WordPress注释ID在网址的末尾,即“ editcomment&c =”之后。 在上面的屏幕截图中,您的评论ID为4。

Similar to posts, pages, categories, and tags, you can also open the comment editor page to view your comment ID.

与帖子,页面,类别和标签类似,您也可以打开评论编辑器页面以查看您的评论ID。

On the comment editor page, you can find your comment ID at the end of the comment edit URL.

在评论编辑器页面上,您可以在评论编辑URL的末尾找到您的评论ID。

WordPress Comment ID in Web Browser's Address Bar
如何在WordPress中查找用户ID? (How to Find a User ID in WordPress?)

Just like other items we discussed above, you can also find a user ID by looking at the user editing URL or by editing it.

就像我们上面讨论的其他项目一样,您也可以通过查看用户编辑URL或对其进行编辑来找到用户ID。

Go to Users » All users and hover your mouse over the user name. WordPress will show the user edit URL in a small popup box at the bottom left corner of your screen.

转到用户»所有用户,然后将鼠标悬停在用户名上。 WordPress将在屏幕左下角的小弹出框中显示用户编辑URL。

WordPress User ID

The number that comes after ‘user_id=’ and before ‘&wp’ is your WordPress user ID. In the screenshot above, the user ID is 3.

在'user_id ='之后和'&wp'之前的数字是您的WordPress用户ID。 在上面的屏幕截图中,用户ID为3。

You can find a user ID also in the user editor page. Click on the Edit link under a user name. Next, WordPress will open the user’s profile, and you can get the user ID from the browser’s address bar.

您也可以在用户编辑器页面中找到用户ID。 单击用户名下的“编辑”链接。 接下来,WordPress将打开用户的个人资料,您可以从浏览器的地址栏中获取用户ID。

WordPress User ID in Web Browser's Address Bar

If you are trying to find out your own user ID, then WordPress will open the profile editor without a user ID in the URL.

如果您尝试查找自己的用户ID,则WordPress将打开配置文件编辑器,而URL中没有用户ID。

To find your own user ID, go to Users » All Users. WordPress will display a list of authors with the number of posts they have written next to it.

要找到您自己的用户ID,请转到用户»所有用户 。 WordPress将在列表旁边显示作者列表以及他们撰写的帖子数量。

Hover the mouse over the number of posts you have written, and you will be able to see your author edit URL at the bottom left corner of the screen. The URL includes your author ID.

将鼠标悬停在您撰写的帖子数上,您将能够在屏幕的左下角看到您的作者编辑URL。 该URL包含您的作者ID。

Your User Profile ID in WordPress

Alternatively, you can click on the number of posts you have written, and then WordPress will redirect you to a page that lists all posts written by you. Here, you can get the user ID from browser’s address bar because it will be displayed as an author, like this:

或者,您可以单击已撰写的帖子数量,然后WordPress将您重定向到列出您撰写的​​所有帖子的页面。 在这里,您可以从浏览器的地址栏中获取用户ID,因为它会显示为作者,如下所示:

Your User Profile ID in WordPress - On Browser's Address Bar

In this example, the user (author) ID is 1.

在此示例中,用户(作者)ID为1。

We hope this article helped you find the post, category, tag, comments, and user ID in WordPress. You may also want to see our guide on how to do basic image editing in WordPress (crop, rotate, scale, flip).

我们希望本文能帮助您找到WordPress中的帖子,类别,标签,评论和用户ID。 您可能还希望查看我们的指南, 了解如何在WordPress中进行基本图像编辑 (裁剪,旋转,缩放,翻转)。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/beginners-guide/how-to-find-post-category-tag-comments-or-user-id-in-wordpress/

查找wordpress端口

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值