內容簡介
這個外掛會在你的編輯器中新增「External Link」區塊。
如果你的文章在你的網站中被當作新聞使用,有時候一篇文章的標題只是簡單地寫著「我們的服務在知名網站上被推廣了」,並且只有一個連結到 PR 網站。
這個外掛會新增一個元件框以保存以下的 metadata:
外部連結
在新視窗中開啟
如果你設定了外部連結,the_permalink 將會被取代成它。你小工具、文章存檔等等的連結都會參考你所儲存的 URL。
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds an “External Link” section to the post editor.
If you’re publishing posts that are primarily used to link to external news articles or resources, the plugin overrides the post’s permalink and redirects users to the specified external URL when they click the post.
The “External Link” section has two options:
External link (This URL will replace the return value of the_permalink)
Open in new window (checkbox)
By setting an external link, the link in your widget, post archive and so on, will refer to the new URL you saved.
Settings
This plugin adds a new section to Writing Settings with 3 different options.
Post Types
Lets you select which post types should support external links.
Attributes
When set to Automatic, the target and rel attributes will be automatically added to anchor elements linking to the new URL, using jQuery.
When set to Manual, developers must manually add anchor elements. You can either use tsep_anchor_attributes() to generate the href, rel and target attributes, or use the_permalink() to populate the href attribute and tsep_target_attributes() to add the target and rel attributes separately.
Easy method:
Click here!
With separate attributes:
Click here!
Single Page Content
This option allows you to manually write an anchor element that will be added to the post’s content. Use %link% for the external link, and %rel% for the target and rel attributes.
Click here!
This will produce the following output:
Click here!
