內容簡介
注意:此外掛目前不支援區塊編輯器(Block Editor)。
此外掛能在您的頁面和文章內容中,新增一個獨特的 ID 屬性,然後將這些錨點加入連結彈出視窗中,讓您輕鬆地將連結跳轉至內容中的標題。
使用此外掛
此外掛不需要任何設定或預設值,啟用後即可開始使用。
此外掛的運作方式是,為您內容中的標題加上獨特的「id」屬性,開啟編輯器時此外掛會為所有 h2 和 h3 標題都新增一個獨特的 ID。儲存內容後,這些標題就會變成可供使用的「錨點」。
要建立一個錨點連結,只需新增所需的連結文字,選取文字,然後點選「新增連結」圖示。如果您開始輸入要跳轉至的標題,搜尋結果中會出現那個標題的錨點連結。選取該錨點即可產生連結。
如果您想要從其他頁面產生連結跳轉至一個標題,您可以在一般的頁面連結中添加錨點連結(開頭為「#」),當使用者點選連結時,就會跳轉至該標題所在的頁面。
例如,假設您在https://xnau.com/content-anchor-links/網頁上有一個頁面,該頁面說明如何製作鏈結清單,頁面上有一個名為「教學」的標題,HTML 中會看到標題有一個「id」,如下所示:<h2 id="a-tutorial">A Tutorial</h2>您可以使用以下 URL 直接到達該標題:https://xnau.com/content-anchor-links/#a-tutorial
外掛標籤
開發者團隊
原文外掛簡介
Note: This plugin is not currently compatible with the Block Editor.
This plugin adds a unique ID attribute to healings in your page and post content, and then makes those anchors available in the linking pop-up. This makes it very easy to add “jump” links to headings within the content.
Using the Plugin
This plugin doesn’t use any settings or require any setup, just activate it and it’s features are available.
The plugin works by adding a unique “id” to the headings in your content. When you open your content for editing, the plugin adds unique ids to all the h2 and h3 headings. After saving the content, those headings become available as “anchors” which can be linked to.
To create an anchor link, add the desired link text, select it and click the “add link” icon. If you begin typing the heading you want the link to jump to, the anchor link for that heading will appear in the search results. Choose that anchor to place your link.
If you want a link from another page to jump to a heading, you can add the anchor link (begins with a “#”) to the regular page link and when that link is clicked on the user will be taken to that heading on the new page.
For example, let’s say you have a page at https://xnau.com/content-anchor-links/ that explains how to make a link list, and on that page is a tutorial with the heading “A Tutorial” If you look at the HTML for that page, you’ll see that the heading has an “id”, like this:
A Tutorial
You can create a link that goes directly to that heading with a URL like this: https://xnau.com/content-anchor-links/#a-tutorial
