wordpress创建
Categories and tags are built-in elements of the WordPress infrastructure that enable you to organise information on your website so that it is meaningful to visitors and easy to find. In this article, we’ll explain how you can use categories and tags and show you how to create them.
类别和标签是WordPress基础结构的内置元素,可让您组织网站上的信息,使信息对访问者有意义并易于查找。 在本文中,我们将说明如何使用类别和标签,并向您展示如何创建它们。
Before we start, it’s important to know that categories and tags can only be used to organise posts, they cannot be used to organise pages. If you are unsure of the difference, read our recent article about the difference between WordPress posts and pages.
在开始之前,重要的是要知道类别和标签只能用于组织帖子,而不能用于组织页面。 如果您不确定差异,请阅读我们最近关于WordPress帖子和页面之间差异的文章 。
什么是类别,它们有什么用? (What are categories and how are they useful?)
Categories are a simple way to group together posts that have similar themes so that it is easy for your visitors to find them. For example, a bank website could have posts sorted into the following categories: accounts, credit cards, loans, and savings. If needed, they could create subcategories too, so under loans, they could have mortgages and personal loans and under savings, they could have ISAs and investments. This way, a visitor wanting to find posts about a specific topic could find them all grouped together in one place.
类别是将具有相似主题的帖子组合在一起的一种简单方法,因此访问者可以轻松找到它们。 例如,某银行网站的帖子可以分为以下几类:帐户,信用卡,贷款和储蓄。 如果需要,他们也可以创建子类别,因此在贷款下,他们可以拥有抵押和个人贷款,而在储蓄下,它们可以拥有ISA和投资。 这样,希望找到有关特定主题的帖子的访问者可以将所有帖子集中在一起。
The other advantage of WordPress categories is that they are indexed by search engines. When you submit your sitemap to Google, it will understand how you have organised the content of your site and this will help show how relevant your posts are to people’s search queries, improving the chances of your individual posts ranking better in results.
WordPress类别的另一个优点是它们由搜索引擎索引。 当您将站点地图提交给Google时,它将了解您如何组织网站内容,这将有助于显示您的帖子与人们的搜索查询之间的相关性,从而提高各个帖子在结果中排名更高的机会。
您如何在WordPress中创建类别? (How do you create a category in WordPress?)
Creating a category is a simple process. Just follow these easy steps.
创建类别是一个简单的过程。 只需按照这些简单的步骤。
- Login to your admin panel 登录到管理面板
Click on ‘Posts’ in the sidebar and then on ‘Categories’.
单击边栏中的“帖子”,然后单击“类别”。
When the Categories page opens, fill in the boxes on the left-hand side of the screen:
当“类别”页面打开时,填写屏幕左侧的框:
- Choose a name for your category and type it in the name section. 为您的类别选择一个名称,然后在名称部分中键入它。
- For ease of use, type the same name, in lower case, in the Slug section. (The slug is the part of the category name that will be used to create the category web address. If your website is www.mysite.com and your category slug is ‘football’, the address of the category page will be www.mysite.com/football. It is possible to have a slug which is different to the category name, but this can be confusing.) 为了便于使用,请在“ Slug”部分键入小写的相同名称。 (该条目是类别名称的一部分,将用于创建类别网址。如果您的网站是www.mysite.com,而您的类别条目是“足球”,则类别页面的地址将是www.mysite .com / football。可能会出现与类别名称不同的信息,但这可能会造成混淆。)
- Unless you are creating a subcategory, leave the dropdown box that says ‘Parent’ as it is. If you wish to create a subcategory, clicking on the dropdown box will provide a list of all the existing categories you have created. Choose the one you want your new category to be a subcategory of. 除非您要创建子类别,否则请保持原样显示“父母”的下拉框。 如果要创建子类别,请单击下拉框将提供您已创建的所有现有类别的列表。 选择一个您希望您的新类别成为其子类别的类别。
- You do not need to fill in the description box. However, if you are going to have lots of categories, it might be a helpful reminder of what the content is about when you come to allocate posts to categories. 您无需填写说明框。 但是,如果您要创建多个类别,则可能有助于提醒您在将帖子分配到类别时所涉及的内容。
- To finish, click the ‘Add New Category’ button. 最后,点击“添加新类别”按钮。
如何将帖子分配到类别? (How do I assign a post to a category?)
When you create a post in WordPress, you will find a range of option boxes down the right-hand side of the page. One of these is for choosing the category that you want to assign the post to. It looks like this:
在WordPress中创建帖子时,您会在页面右侧下方找到一系列选项框。 其中之一是用于选择要将帖子分配到的类别。 看起来像这样:
![Wp 13 3](https://i-blog.csdnimg.cn/blog_migrate/82ff0bf6866d2807a8c03308f1495155.gif)
Simply click on the category you want the post to go into. Once you publish the post, the allocation is complete. You can always move a post to a different category at a later time if you wish.
只需单击您想要帖子进入的类别。 发布帖子后,分配完成。 如果愿意,您以后随时可以将帖子移至其他类别。
It is possible to put a post into more than one category, but this can be confusing for readers and can lead search engines to think you have duplicate content on your site, so it is best avoided.
可以将一个帖子放在多个类别中,但这可能会使读者感到困惑,并且可能导致搜索引擎认为您的网站上存在重复的内容,因此最好避免这样做。
用户如何找到类别? (How can users find categories?)
You can add categories to your menus and most themes come with a category widget which you can place in your sidebar. Both of these methods will produce a list of your categories with links to their category page. Here visitors will find the posts in those categories listed in reverse chronological order.
您可以在菜单中添加类别,大多数主题都带有类别小部件,您可以将其放置在侧边栏中。 这两种方法都会产生您的类别列表,并带有指向其类别页面的链接。 在这里,访客将找到按逆序排列的那些类别的帖子。
什么是标签,它们有什么用? (What are tags and how are they useful?)
The best way to understand a tag is to think of it as a label or like a Twitter hashtag. They are used, in a similar way to categories, to group related posts together. However, instead of using them as an alternative to a category, they are best used as a way to compliment your categories. For example, if you have a fashion website and have categories for men’s, women’s and children’s clothes and subcategories for smart and casual for each category, then adding any more categories could get confusing. Instead, you can label posts with various tags. So you might have brand tags, such as Ralph Lauren or Moschino and season tags, spring, summer, autumn and winter. If a visitor is specifically looking for posts about a brand or for seasonal clothes, they can use tags instead of categories to search for them.
理解标签的最佳方法是将其视为标签或Twitter Twitter标签。 它们以类似于类别的方式用于将相关职位分组在一起。 但是,与其将它们用作类别的替代,最好是将它们用作补充类别的一种方式。 例如,如果您有一个时尚网站,并且每个类别都有男士,女士和童装的类别,以及针对智能和休闲的子类别,则添加更多类别可能会造成混淆。 相反,您可以使用各种标签来标记帖子。 因此,您可能会有品牌标签,例如Ralph Lauren或Moschino,以及Spring,夏季,秋季和冬季的季节标签。 如果访客专门寻找有关品牌或季节性服装的帖子,则可以使用标签而不是类别来搜索。
Just like categories, tags can be indexed by search engines, which helps tagged posts have a better chance of ranking well in search results. However, you should avoid using too many tags.
就像类别一样,标记可以由搜索引擎索引,这有助于标记的帖子在搜索结果中更好地排名。 但是,应避免使用太多标签。
如何在WordPress中创建标签? (How do you create a tag in WordPress?)
Click on ‘Posts’ in the sidebar and then on Tags
点击边栏中的“帖子”,然后点击标签
When the Tags page opens, fill in the boxes on the left-hand side of the screen:
当“标签”页面打开时,填写屏幕左侧的框:
- Choose a name for your tag and type it in the name section. 为标签选择一个名称,然后在名称部分中键入它。
- For ease of use, type the same name, in lower case, in the Slug section. (The slug is the part of the tag name that will be used to create the tag web address. If your website is www.mysite.com and your tag slug is ‘summer’, the address of the tag page will be www.mysite.com/summer. It is possible to have a slug which is different to the tag name, but this can be confusing. 为了便于使用,请在“ Slug”部分键入小写的相同名称。 (标签是标签名称的一部分,它将用于创建标签网址。如果您的网站是www.mysite.com,而标签标签是“夏季”,则标签页面的地址将是www.mysite .com / summer。可能会有一个与标签名称不同的标签,但这可能会造成混淆。
Notice, that unlike categories you cannot have sub-tags.
请注意,与类别不同,您不能具有子标签。
- As with categories, you do not need to fill in the description box. However, if you are going to have lots of tags, it might be a helpful reminder of what the tag is used for when you come to tagging your posts. 与类别一样,您无需填写说明框。 但是,如果您要使用很多标签,则可能有助于提醒您在标记帖子时使用了什么标签。
- To finish, click the ‘Add New Tag’ button. 最后,点击“添加新标签”按钮。
如何在帖子中添加标签? (How do I add a tag a post?)
When you create a post in WordPress, you will find a range of option boxes down the right-hand side of the page. One of these is for adding tags to the post. It looks like this:
当您在WordPress中创建帖子时,您会在页面右侧下方找到一系列选项框。 其中之一是为帖子添加标签。 看起来像这样:
![How do I add a tag a post?](https://i-blog.csdnimg.cn/blog_migrate/82ff0bf6866d2807a8c03308f1495155.gif)
To add a tag, simply type its name in the box and click ‘Add’. The name usually appears automatically after you have started typing the first few letters. You can also create a new tag through this method. If you click on the ‘Choose from the most used tags’ link, these tags will appear underneath. To use that tag, double-click it. Once you publish the post, the tag allocation is complete. You can always remove or add a tag to a post at a later time if you wish.
要添加标签,只需在框中输入标签名称,然后单击“添加”。 该名称通常在您开始输入前几个字母后自动显示。 您也可以通过此方法创建一个新标签。 如果您点击“从最常用的标签中选择”链接,这些标签将显示在下方。 要使用该标签,请双击它。 发布帖子后,标签分配就完成了。 如果愿意,您随时可以在以后将其删除或添加标签。
It is possible to give a post more than one tag; however, it is best to keep the number of tags to a minimum.
可以给一个帖子添加多个标签; 但是,最好将标签数量保持在最少。
用户如何查找带有特定标签的帖子? (How can users find posts with a specific tag? )
Generally, whilst menus are used for categories and pages, they are not used for tags. The main way to find tagged posts is through your site search. However, there are also widgets which can be displayed in your sidebar which list your most popular tags. These have links which take visitors to the tags page where they can find the posts with those tags. Some themes also display a post’s tags on an actual post, allowing visitors to find similarly tagged posts after they have finished reading.
通常,虽然菜单用于类别和页面,但菜单不用于标签。 查找带标签的帖子的主要方法是通过网站搜索。 但是,也可以在边栏中显示一些小部件,其中列出了您最受欢迎的标签。 这些链接具有将访问者带到标签页面的链接,他们可以在其中找到带有这些标签的帖子。 一些主题还会在实际帖子上显示帖子的标签,以使访问者在阅读完毕后可以找到带有类似标签的帖子。
结论 (Conclusion)
You should now have a clear idea what categories and tags are, how they are used to group similar posts together on a website and how to create them. You should also know how to assign a post to a category and give it a tag. In addition, you should have a better understanding of how categorising and tagging posts can benefit users and improve SEO.
现在,您应该清楚地知道什么是类别和标签,如何将它们用于将网站上的相似帖子组合在一起以及如何创建它们。 您还应该知道如何将帖子分配给类别并为其赋予标签。 此外,您应该对帖子的分类和标记如何使用户受益并改善SEO有更好的了解。
翻译自: https://www.eukhost.com/blog/webhosting/how-to-use-and-create-categories-and-tags-in-wordpress/
wordpress创建