前言介紹
- 這款 WordPress 外掛「Post-to-Post Links」是 2004-12-20 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 60 個安裝啟用數。
- 上一次更新是 2018-06-10,距離現在已有 2525 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.7 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
post | links | pages | posts | shortcode |
內容簡介
這個外掛可使用短代碼 by id 或 slug(引用文章)輕輕鬆鬆地建立到另一個文章的連結,除非被覆寫,否則連結文字會是文章的標題。
在編寫文章時,您可以按 ID 引用其他文章,像這樣:
[post2post id="20"]
或按文章縮略名/名稱引用,像這樣:
[post2post id="hello-world"]
在網站上查看時,引用文章的 post-to-post 連結標籤會被替換為向您引用的文章的永久鏈接。默認情況下,鏈接的文本將是引用文章的標題,結果會像這樣:
您可以通過指定 post-to-post 連結標籤的 text="" 屬性和值,自定義鏈接文本:
Check out [post2post id="hello-world"]my first post[/post2post].
這會得到下面的結果:
Check out "my first post"。
該插件通過 WordPress 管理員界面的 設置 -> Post2Post 提供自己的管理選項頁面 。在這裡,您可以定義要出現在每個文章替換之前和/或之後的文本,以及是否要啟用舊標籤支持。該插件的管理頁面還提供了一些文檔。
鏈接: 外掛主頁 | 外掛目錄頁 | GitHub | 作者主頁
範例
這些都是引用您博客上另一篇文章的有效方式。
[post2post id="25"]
[post2post id="25"/]
`[post2post id=”the-best-post-ever”]
`[post2post id=”the-best-post-ever”/]
假設以上所有方式都用於引用同一篇文章,則 post-to-post 縮寫的替換會是:
對於以上任何一個,您還可以選擇將短代碼包圍在文本周圍。如果定義了這樣的文本,則該文本將用作鏈接文本,而不是引用文章的標題。
[post2post id="25"]this post[/post2post]
[post2post id="blog-anniversary"]Congratulate me![/post2post]
其中第一個會產生:
您還可以選擇可選定義生成鏈接之前和之後顯示的文本。默認情況下,這些是引言。
`[post2post id=”25″ before=” ” after=”!”]
結果如下:
Legacy
舊語法 — 除非您使用的是 v3.0 以前的版本,否則不建議使用 — 允許您使用偽短代碼語法或 HTML 註釋語法按 ID 引用其他文章,如下所示:
[post="20"] 或 ``
or by the post slug/name, like so:
[post="hello-world"] or `.`
The HTML comment notation was the original syntax employed by earlier versions of this plugin (pre v2.0). While it is still supported, it is no longer the primary and recommended syntax. The pseudo-shortcode syntax was in use between v2.0 and v3.0 of the plugin.
NOTE: The HTML comment syntax notation does NOT play well with the visual (aka rich-text) editor in the WordPress admin.
Examples of old legacy syntax follow. Those that use the pseudo-shortcode syntax (i.e. [post=25]) only work if you’ve checked “Enable legacy pseudo-shortcode tag support?”. Those that use HTML comment notation (i.e. ) only work if you’ve checked “Enable legacy HTML comment-style tag support?”.
[post=25]
[post="25"]
[post = "25"]
[post='25']
[post = '25']
[post="the-best-post-ever"]
[post = "the-best-post-ever"]
[post='the-best-post-ever']
[post = 'the-best-post-ever']
NOTE: Only activate the legacy mode(s) that apply to your use of older versions of the plugin. If you started using the plugin at v3.0 or later, you should not activate either legacy mode.
Filters
The plugin exposes one filter for hooking. Typically, customizations utilizing this hook would be put into your active theme’s functions.php file, or used by another plugin.
c2c_post2post_shortcode (filter)
The ‘c2c_post2post_shortcode’ hook allows you to define an alternative to the default shortcode tag. By default the shortcode tag name used is ‘post2post’. It is recommended you only utilize this filter before making use of the plugin’s shortcode in posts and pages. If you change the shortcode tag name, then any existing shortcodes using an older name will no longer work (unless you employ further coding efforts).
Arguments:
$shortcode (string)
Example:
/**
* Use a shorter shortcode: i.e. [p2p id="32"]
*
* @param string $shortcode The default shortcode name.
* @return string The new shortcode name.
*/
function change_post2post_shortcde( $shortcode ) {
return 'p2p';
}
add_filter( 'c2c_post2post_shortcode', 'change_post2post_shortcde' );
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Post-to-Post Links」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Broken Link Checker 》Broken Link Checker 監控並測試網站內部和外部的所有連結,尋找失效連結。它可以幫助您修復錯誤的連結,以提高 SEO 和用戶體驗。, 功能, , 監視文章、頁面、...。
Velvet Blues Update URLs 》如果你把你的 WordPress 網站移到新的網域名稱,你會發現內部頁面連結和圖片參照沒有被更新,還是指向原本的舊網域名稱。這個外掛可以幫助你更改網站中的舊連...。
LuckyWP Table of Contents 》ptoc] used to manually insert the table of contents., Filters lwptoc_settings, lwptoc_post_settings, Use for change plugin settings programmaticall...。
Export All URLs 》此外掛將會在「工具」下新增一個名為「匯出所有網址」的頁面。您可以前往該頁面,並從您的網站中提取資料。可以匯出以下文章內容:, , 文章 ID, 標題, 網址, ...。
Gallery Custom Links 》Gallery Custom Links 可讓您將相片連結到指定的 URL。已經過 WordPress 相片集、Gutenberg、Meow Gallery 等等的測試。官方網頁在這裡:Gallery Custom Link...。
External Links in New Window / New Tab 》這個外掛可以在新分頁或新視窗中開啟外部連結。您可以設定強制開啟新視窗的網址或忽略某些連結不開啟新分頁。, 此外掛程式產生的代碼符合 XHTML Strict 規範...。
Link Whisper Free 》你有興趣使用更快速、更容易的方式建立內部連結嗎?如果是的話,Link Whisper 是一款能夠幫助你獲得強大內部連結價值,而無需手動建立的工具。, 小建議,大效...。
Link Manager 》在 WordPress 3.5 中,預設會停用連結管理員 (有些人用它建立 blogrolls)。如果您在更新時有連結,它仍會存在。, 但您可以使用此外掛來確保它永遠存在,即使...。
AutoConvert Greeklish Permalinks 》AutoConvert Greeklish Permalinks可以將所有持久化鏈結中的希臘字母轉換為拉丁字母。此外,該外掛程序確保每個新的持久化鏈結都是使用希臘拉丁字母書寫,並...。
Title and Nofollow For Links (Classic Editor) 》這個外掛程式在插入連結彈出框中恢復了 WordPress 4.2 中刪除的「Title」欄位,並新增了一個「將連結加上 rel="nofollow"」的勾選框。, Gutengerg(區塊編輯...。
Link Juice Keeper 》錯誤 404 ( 找不到頁面 ) 很常見,也是造成搜尋引擎,例如 Google,把網站排名降低的主要原因之一。處理 404 錯誤對於非技術人員來說可能相當複雜。有了這個...。
Events Tracker for Elementor 》這是一個簡單而極其有用的 Elementor 外掛,可以讓您追蹤與您喜愛的頁面建構器建立的網站上的事件和轉換。您只需要開啟必要的切換按鈕,就可以做好了 😎, ✅ ...。
Disable Author Archives 》這是一個簡單輕量的 WordPress 外掛,可以完全停用作者存檔/頁面(無論相應的作者是否存在),並使網頁伺服器返回404狀態碼('未找到')。相關連結也將禁用或...。
Interlinks Manager – Internal Links Optimizer 》Interlinks Manager 是一款能夠協助監測和優化內部連結的 SEO WordPress 外掛。, 該外掛利用強大的 PHP 正則表達式來生成內部連結數據,然後進行分析,為您提...。
Automatic Domain Changer 》這個外掛可以自動偵測網域名稱更改,並更新數據庫中的 WordPress 表格來反映這個更改。, 功能, , 輕鬆地將 WordPress 網站從一個網域遷移到另一個網域, 同時...。