自定义链接区块

返回区块列表

自定义链接块允许您在导航部分嵌入链接、页面、分类或其他项目。

WordPress editor block: Add link window with typed URL, toolbar, and options for updating the link.

要嵌入自定义链接,请点击区块插入器(+)图标或在编辑器中输入“/navigation”来添加导航块。

The plus icon in the toolbar and the Navigation block selection option to add a Custom link block

添加导航块后,将出现添加链接字段。输入您的URL,或从您在WordPress上使用或创建的近期页面中选择。按回车键保存链接。

URL pasted to the Custom Link block with option to select other items and the toolbar above.

您可以在一个导航部分插入多个自定义链接块。编辑一个链接后按回车键,将出现一个新的添加链接字段。每个自定义链接块可以有独立的链接和文本设置。

One Custom Link block selected, Bold and Italics text formatting applied to it, and Options section expanded to click Duplicate.

有关添加区块的详细说明可在此处找到。

区块工具栏

每个区块都有自己的工具栏,其中包含允许您自定义或配置区块的独特控件。自定义链接块的工具栏上具有以下选项:

转换为

您可以将自定义链接块转换为:

  • 子菜单,将您的链接转换为包装链接列表
  • 间隔,用于用空区块分隔多个链接
  • 搜索,创建搜索栏
  • 主页链接,链接到您网站的主页
  • 网站标志,用于添加您的网站标志
  • 社交图标,用于嵌入指向选定社交媒体平台的按钮
Custom Link block editor toolbar with the selected ‘Transform to’ icon and unwrapped options for updates.

区块移动工具

您可以在导航部分内重新排列自定义链接块。使用工具栏将项目向左和向右移动或将它们拖动到新位置。

Two toolbars with the Move option and example of a Custom Link block and with the Drag tool featured with three blocks.

有关更多信息,请探索导航块

链接工具

链接工具允许您编辑自定义链接块。您可以编辑标题自定义URL,并决定是否要在新标签页中打开链接。

The toolbar with a Custom Link block editing process containing typing a title, selecting to open in a new tab, and demonstrating the unlink option.

向自定义链接块添加子菜单

下一个图标允许您构建一个子菜单,您可以在其中将链接添加到下拉列表中。

WordPress editor Submenu section in the Navigation block applied to the selected Custom Link with the options to type URL or select an item.

文本格式

所有自定义链接块都提供基本的文本格式。选择您的标题(或其中一部分)以使其变为粗体斜体删除线,或者将其转换为内联图像以用插图覆盖您的链接。

WordPress Custom Link block toolbar with selected text formation and additional options unwrapped, followed by the edited block example.

更多选项

选项部分打开区块设置以及一个按钮,用于移动到父导航字段部分以进行更新。您还可以复制复制锁定删除您的自定义链接。与WordPress编辑器中的其他地方一样,您可以使用Ctrl+Z(或macOS上的Command+Z)撤消操作。

有关更多选项的详细信息,请参阅此支持文章

区块设置

每个链接都有其区块设置,您可以通过单击编辑器右上角的设置按钮或通过工具栏中的选项访问。

链接设置

链接设置部分包含以下选项:

  • 如果所选主题包含此选项,则为与链接一同显示的描述
  • 链接标题,用于为搜索引擎优化提供有关链接的更多信息。如果您希望保留URL设置中使用的标题,请将此字段留空。
  • 链接rel,用于指定您的外部链接与您正在处理的页面之间的关系,以及其权限是否应高于您网站的权限。

有关更多信息,请参阅导航块文档

The link settings section of the Custom Link blocks the WordPress editor with the description inserted, the link title left empty, and the link rel field filled with ‘nofollow.’

排版

自定义链接块提供排版设置,以更改字体系列、外观、行高、字母间距、装饰、字母大小写和字体大小。

有关详细信息,请参阅此支持文章:排版设置概述

高级

高级部分具有附加CSS类选项。您可以通过将CSS类名插入此字段,将自定义样式集成到自定义链接块中。

Additional class in Advanced settings.

更新日志

  • 2023-07-25
    • 修复损坏的图片URL
  • 创建日期:2022-12-11

这篇文章有帮助吗?如何改进?

首次发布

最后更新