wordpress添加页面_如何在WordPress中添加HTML Sitemap页面

本文介绍了如何在WordPress中添加HTML网站地图,区别于用于搜索引擎的XML网站地图,HTML网站地图为用户提供页面列表。文章详细展示了通过Hierarchical HTML Sitemap插件和WP Sitemap Page插件创建HTML网站地图的方法,包括显示所有页面和仅显示页面的选项。
摘要由CSDN通过智能技术生成

wordpress添加页面

Are you looking to build a HTML sitemap in WordPress? Unlike XML sitemaps that you submit to search engines for better crawling, HTML sitemaps show an organized list of your pages for your users. In this article, we will show you how to add an HTML sitemap page in WordPress.

您是否要在WordPress中构建HTML网站地图? 与提交给搜索引擎以进行更好爬网的XML网站地图不同,HTML网站地图会为用户显示页面的组织列表。 在本文中,我们将向您展示如何在WordPress中添加HTML网站地图页面。

XML和HTML站点地图之间有什么区别 (What’s The Difference Between XML and HTML Sitemaps)

An XML sitemap is written or generated in XML markup language preferred by search engines. You can submit your site’s XML sitemap to webmaster tools to improve and control your site’s crawling rate by search engines.

XML站点地图是以搜索引擎首选的XML标记语言编写或生成的。 您可以将网站的XML网站地图提交给网站站长工具,以提高和控制搜索引擎对网站的爬网速度。

An HTML sitemap on the other hand is supposed to be geared towards your actual website visitors. It is written or generated in plain HTML, and it usually lists all the pages/posts that are available on your WordPress site.

另一方面,HTML网站地图应该适合您的实际网站访问者。 它是用纯HTML编写或生成的,通常会列出WordPress网站上可用的所有页面/帖子。

Now that you know the difference, lets add a HTML sitemap page in WordPress.

现在您已经知道了区别,让我们在WordPress中添加一个HTML网站地图页面。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

添加包含所有帖子和页面HTML网站地图 (Adding an HTML Sitemap With All Posts and Pages)

First thing you need to do is install and activate the Hierarchical HTML Sitemap plugin. The plugin works out of the box and there is no settings page for it.

您需要做的第一件事是安装并激活Hierarchical HTML Sitemap插件。 该插件可以直接使用,没有设置页面。

Simply create a new page where you want to display your sitemap. Next, add this simple shortcode inside the content area.

只需在要显示站点地图的地方创建一个新页面即可。 接下来,在内容区域内添加此简单的简码。

[htmlmap showpages]

[htmlmap showpages]

This is how the plugin will show your sitemap. At top, it will show your categories with the number of posts in each category following by a list of your posts and then finally your pages.

这就是插件显示您的站点地图的方式。 在顶部,它将显示您的类别以及每个类别中的帖子数,其后是您的帖子列表,最后是页面。

HTML Sitemap in WordPress with categories and posts

Even though the plugin does not have a settings page, the shortcode itself comes with a number of parameters. This allows you to setup your HTML sitemap in anyway you want. See the plugin’s download page for a full list of parameters, and how to use them.

即使插件没有设置页面,短代码本身也带有许多参数。 这样一来,您就可以随时设置HTML网站地图。 有关参数的完整列表以及如何使用它们,请参见插件的下载页面。

在WordPress中创建HTML网站地图,仅显示页面 (Creating an HTML Sitemap in WordPress Showing Only Pages)

Many site owners use WordPress as a CMS with their main content served as pages (See our guide on the difference between posts and pages).

许多网站所有者将WordPress用作CMS,其主要内容用作页面(有关帖子和页面之间区别,请参见我们的指南)。

In this case, you would want to your HTML Sitemap to show pages in the proper hierarchical order. Here is how you can add HTML Sitemap with only pages.

在这种情况下,您希望HTML Sitemap以正确的层次结构顺序显示页面。 您可以通过以下方法添加仅包含页面HTML Sitemap。

First thing you need to do is install and activate the WP Sitemap Page. Upon activation, simply add this shortcode to the page where you want to display your HTML sitemap.

您需要做的第一件事是安装并激活WP Sitemap页面 。 激活后,只需将此简码添加到要显示HTML网站地图的页面即可。

[wp_sitemap_page only=”page” display_title=”false”]

[wp_sitemap_page only =” page” display_title =” false”]

This is how it will display your HTML sitemap with all your WordPress pages listed in a hierarchical list.

这样,它将显示HTML站点地图,并在层次结构列表中列出所有WordPress页面。

HTML sitemap showing only WordPress pages

WP Sitemap Page comes with a lot of options and you can configure them by visiting Settings » WP Sitemap Page in your WordPress admin area.

WP Sitemap页面带有许多选项,您可以通过访问WordPress管理区域中的“设置”»WP Sitemap页面来配置它们。

We hope this article helped you learn how to add an HTML sitemap page in WordPress. You may also want to see our list of 9 best WordPress SEO plugins and tools that you should use.

我们希望本文能帮助您学习如何在WordPress中添加HTML网站地图页面。 您可能还想查看我们应该使用的9种最佳WordPress SEO插件和工具列表。

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/plugins/how-to-add-an-html-sitemap-page-in-wordpress/

wordpress添加页面

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值