內容簡介
這個外掛讓您可以在內容中建立內部<a> 鏈接,即使東西被重新命名或移動,也不會出現錯誤。雖然有類似的外掛可用,但它們沒有提供重要的 SEO 選項。
只要以前綴為 attr_,您可以將任何 HTML 屬性添加到您的鏈接中。而且,由於它支持當前可能不存在的屬性,因此它具備未來的擴展性。
例如:
按 ID 或 Slug 連接到文章/頁面
短碼: [link id="1234"/]
短碼: [link slug="post-slug"/]
輸出: <a href="http://domain.com/post-slug/">文章標題</a>
按 Slug 連接到分類
短碼: [link cat="cat-slug"/]
輸出: <a href="http://domain.com/cat-slug/">分類名稱</a>
按 Slug 連接到標籤
短碼: [link tag="tag-slug"/]
輸出: <a href="http://domain.com/tag-slug/">標籤名稱</a>
自定義文字而非獲取標題
短碼: [link id="1234"]自定義文字[/link]
輸出: <a href="http://domain.com/post-slug/">自定義文字</a>
其他 SEO 屬性
短碼: [link id="1234" attr_rel="something" attr_itemprop="specialty"/]
輸出: <a href="http://domain.com/post-slug/" rel="something" itemprop="specialty">文章標題</a>
外掛標籤
開發者團隊
原文外掛簡介
This plugin allows you to create internal links within your content that will not break when things get renamed or moved. While there are similar plugins available, they do not offer important SEO options.
You can add any HTML attribute to your link as long as it’s prefixed with “attr_”. And because it supports attributes that may not currently exist, it is future proof.
Examples:
Link to a post/page by ID or slug
Shortcode: [link id="1234"/]
Shortcode: [link slug="post-slug"/]
Output: Post Title
Link to a category by slug
Shortcode: [link cat="cat-slug"/]
Output: Category Name
Link to a tag by slug
Shortcode: [link tag="tag-slug"/]
Output: Tag Name
Custom text instead of retrieved title
Shortcode: [link id="1234"]custom text[/link]
Output: custom text
Additional attributes for SEO/other
Shortcode: [link id="1234" attr_rel="something" attr_itemprop="specialty"/]
Output: Post Title
