Post by account_disabled on Dec 12, 2023 6:03:17 GMT
果没有菜单和子菜单,WordPress 网站就没什么意义了。在 WordPress 中根据您的喜好自定义这些菜单非常简单。您的 WordPress 菜单是实现高搜索排名并留住访问者的一线工具。 WordPress 中的专用屏幕不会显示您的菜单有多复杂。您还可以在网站的不同位置显示菜单。如果您有一定的编程知识,您就可以通过几乎无限的可能性来自定义您的 WordPress 菜单。 通过本文,我们为您提供创建 WordPress 菜单的深入指南。我们还将向您展示如何使用该功能并以几种不同的方式改进它。 WordPress 菜单剖析 对于那些不知道的人来说,WordPress 菜单通常是链接的集合(包括下拉菜单)。这是一个简单的功能,只是网站主干中的一根“椎骨”。 WordPress 菜单示例 。 WordPress 菜单示例 我们将在下一节中更详细地讨论如何在网站上查看菜单。现在,请知道它们可以放置在您想要显示的任何位置。您可能只有几个预先选择的选项(基于小部件区域),但从技术意义上讲,菜单可以放在任何地方。 当然,WordPress 菜单对于网站的导航至关重要。如果您有清晰明确的导航菜单,这将有助于用户在您的网站上移动并保持较低的跳出率。 它们还有另一个目的:您的菜单有助于搜索引擎优化 (SEO)。针对 SEO 优化 WordPress 菜单更多的是要删除什么而不是要添加什么的问题。对于初学者来说,您可以消除元素(例如标签云)并保持所包含的链接数量较少。
尽管 Google 允许您在一个页面上添加最多 250 个链接,但保持较高的 电话号码清单 链接价值”至关重要。这就是为什么减少外部链接的数量从长远来看对您有用。 不同类型的 WordPress 菜单结构 您可能已经了解,根据应用程序的需求,您可以选择不同的 WordPress 菜单结构。 例如,标题菜单是最常见的,因为它们负责网站的主要导航。您还经常会在主导航上方看到较小的菜单,这是社交媒体图标、搜索栏等的好地方。 Kinsta 合作伙伴 SAU/CAL 的网站有一个“飞入”菜单,其中包括导航和社交链接: 显示两个菜单的飞入菜单。 显示两个菜单的飞入菜单 此菜单表明 WordPress 菜单的用例不仅仅是导航网站。使用 WordPress 的内置功能(稍后详细介绍),您可以为几乎任何您需要的内容创建菜单。 菜单的另一种流行用途是出现在页脚中。通常,您将使用此区域为向下滚动的用户重复主导航。此外,它是为您的产品和服务提供更多上下文链接的绝佳场所: Kinsta 页脚中的菜单。 Kinsta 页脚中的菜单 如果网站使用侧边栏,您还可能会看到菜单: 侧边栏导航示例 侧边栏导航示例 虽然在许多情况下您不会在这里看到主导航,但它是社交链接、博客文章档案等的传统位置。
如何创建自定义 WordPress 菜单(3 种方法) 无论您的经验水平如何,创建 WordPress 菜单都是一个简单的过程。完成这项工作主要有三种方法:使用 WordPress 的内置功能;安装合适的插件或亲自编写代码。 下面我们将向您展示如何使用这三种方法创建 WordPress 菜单。 1. 使用 WordPress 内置功能创建菜单 WordPress 具有内置工具来帮助您创建菜单。除了最近的用户之外,所有人都会熟悉 WordPress 管理中的专用屏幕。 WordPress 菜单屏幕 WordPress 菜单屏幕 当然,使用本机功能创建 WordPress 菜单有很多好处。对于初学者来说,您与您的网站完全兼容。另外,您可以使用熟悉的界面和本机工具构建自己的菜单。 要到达那里,请转到WordPress 中的“外观”>“菜单”页面: WordPress 菜单链接。 WordPress 菜单链接 该屏幕分为几个不同的部分。在顶部,您将找到选择当前菜单或创建新菜单的选项: 菜单选择下拉菜单 菜单选择下拉菜单 如果您决定创建新菜单,请为其命名并检查菜单设置部分: “菜单设置”部分 这里有很多复选框,但您需要做出两个主要决定: 自动将顶级页面添加到菜单中。这里的“顶级”是指您在 WordPress 中创建的且不依赖于其他页面的页面。例如,博客文章不是顶级页面,因为在许多情况下它会有一个父存档页面(例如/blog)。另一方面,联系页面通常是顶级的,因为它通常没有父页面。 菜单的位置。每个主题都有自己的菜单位置。除非您编辑主题的核心文件,否则开发主题的人都会对这些菜单位置进行硬编码。某些主题包含允许您自定义它们的设置。
尽管 Google 允许您在一个页面上添加最多 250 个链接,但保持较高的 电话号码清单 链接价值”至关重要。这就是为什么减少外部链接的数量从长远来看对您有用。 不同类型的 WordPress 菜单结构 您可能已经了解,根据应用程序的需求,您可以选择不同的 WordPress 菜单结构。 例如,标题菜单是最常见的,因为它们负责网站的主要导航。您还经常会在主导航上方看到较小的菜单,这是社交媒体图标、搜索栏等的好地方。 Kinsta 合作伙伴 SAU/CAL 的网站有一个“飞入”菜单,其中包括导航和社交链接: 显示两个菜单的飞入菜单。 显示两个菜单的飞入菜单 此菜单表明 WordPress 菜单的用例不仅仅是导航网站。使用 WordPress 的内置功能(稍后详细介绍),您可以为几乎任何您需要的内容创建菜单。 菜单的另一种流行用途是出现在页脚中。通常,您将使用此区域为向下滚动的用户重复主导航。此外,它是为您的产品和服务提供更多上下文链接的绝佳场所: Kinsta 页脚中的菜单。 Kinsta 页脚中的菜单 如果网站使用侧边栏,您还可能会看到菜单: 侧边栏导航示例 侧边栏导航示例 虽然在许多情况下您不会在这里看到主导航,但它是社交链接、博客文章档案等的传统位置。
如何创建自定义 WordPress 菜单(3 种方法) 无论您的经验水平如何,创建 WordPress 菜单都是一个简单的过程。完成这项工作主要有三种方法:使用 WordPress 的内置功能;安装合适的插件或亲自编写代码。 下面我们将向您展示如何使用这三种方法创建 WordPress 菜单。 1. 使用 WordPress 内置功能创建菜单 WordPress 具有内置工具来帮助您创建菜单。除了最近的用户之外,所有人都会熟悉 WordPress 管理中的专用屏幕。 WordPress 菜单屏幕 WordPress 菜单屏幕 当然,使用本机功能创建 WordPress 菜单有很多好处。对于初学者来说,您与您的网站完全兼容。另外,您可以使用熟悉的界面和本机工具构建自己的菜单。 要到达那里,请转到WordPress 中的“外观”>“菜单”页面: WordPress 菜单链接。 WordPress 菜单链接 该屏幕分为几个不同的部分。在顶部,您将找到选择当前菜单或创建新菜单的选项: 菜单选择下拉菜单 菜单选择下拉菜单 如果您决定创建新菜单,请为其命名并检查菜单设置部分: “菜单设置”部分 这里有很多复选框,但您需要做出两个主要决定: 自动将顶级页面添加到菜单中。这里的“顶级”是指您在 WordPress 中创建的且不依赖于其他页面的页面。例如,博客文章不是顶级页面,因为在许多情况下它会有一个父存档页面(例如/blog)。另一方面,联系页面通常是顶级的,因为它通常没有父页面。 菜单的位置。每个主题都有自己的菜单位置。除非您编辑主题的核心文件,否则开发主题的人都会对这些菜单位置进行硬编码。某些主题包含允许您自定义它们的设置。