前言介紹
- 這款 WordPress 外掛「Ambrosite Unlink Parent Pages」是 2010-04-28 上架。
- 目前有 80 個安裝啟用數。
- 上一次更新是 2012-02-12,距離現在已有 4829 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.1 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
menu | page | delink | Parent | unlink |
內容簡介
重要提示:此外掛與 Mystique 佈景主題不相容,也無法與 WordPress 3.x 自訂選單系統(即在「外觀」>「選單」下使用拖放式選單建構器建立的選單)相容。如果您想在 Mystique 佈景主題中建立未連結的父級選單項目,請安裝 Mark Jaquith 的「Page Links To」外掛,並在「指向此 URL:」欄位中輸入「#」(井字號)以創建虛擬連結。對於 WP3 選單建構器,請使用一個「自訂連結」,在 URL 欄位中輸入「#」(井字號)。如果您需要更多幫助,請參閱 WP Codex 中的文件:https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links
啟用此外掛後,它會在頁面選單和列表中取消設置子頁面的父頁面(即,具有層級結構下的子頁面的父頁面)。它會影響 wp_list_pages 和 wp_page_menu 的輸出,以及所有使用這些功能的外掛和小工具。
此外掛的作用是將父頁面連結替換為「虛擬連結」,即將父選單項的 href 屬性替換為「#」(井字號)符號。虛擬連結就像一個普通的連結一樣,只是在單擊時會導航回當前頁面。虛擬連結會使用內嵌樣式「cursor:default」,以防止鼠標指針在懸停在無連結選單項上時變成手形。
選項
如要設定此外掛選項,在 WordPress 管理面板中的「設定」選單中單擊「Unlink Parent Pages」。
使用虛擬連結
從 Unlink Parent Pages 1.3 版本開始預設啟用。如果您取消選中此框,該插件將使用 span 標籤替換錨點標籤以取消父頁面的連接。在某些佈景主題中,這可能會導致 CSS 樣式出現問題。為了解決這個問題,您需要將針對錨點標籤的任何規則添加另一個選擇器(詳見常見問題)。如果您在寫入 CSS 選擇器方面沒有經驗,建議仍然使用虛擬連結。
取消連結當前頁面
取消頁面的當前頁面連結及父頁面連結。
刪除連結標題
從連結中刪除 title 屬性(防止當滑鼠懸停在選單項上時,出現工具提示)。這與取消父頁面的連接無關,但很多人都需要這個功能,因此我決定將其包含在內。
最大深度
最大深度設置控制在頁面層級架構中將取消連接的層級數量。它的工作方式與 wp_list_pages 中的「深度」選項完全相同,如下所述:
0(預設值)取消所有父頁面的連接,無論其在頁面層級架構中的位置。
1 僅取消頂層父頁面的連接。
2、3、…… 取消到指定深度的父頁面連接。
-1 不要取消任何頁面的連接(請指定個別頁面)。
取消特定頁面的鏈接
您可以使用逗號分隔的頁面 ID 列表來指定要取消連結的頁面(例如:3, 7, 31)。它的工作方式與 wp_list_pages 的「排除」選項完全相同。如果您只想取消指定頁面的連結,則將最大深度設置為 -1。
原文外掛簡介
IMPORTANT: This plugin is not compatible with the Mystique theme, nor is it compatible with the WordPress 3.x custom menu system (that is, menus created using the drag-and-drop menu builder under Appearance->Menus). If you want to create an unlinked parent menu item with the Mystique theme, install Mark Jaquith’s ‘Page Links To’ plugin, and put a ‘#’ (hash/pound) mark in the ‘Point to this URL:’ field to create a dummy link. For the WP3 menu builder, use a ‘Custom Link’ with a ‘#’ mark in the URL field. Refer to the documentation in the WP Codex if you need more help: https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links
When activated, this plugin unlinks parent pages (that is, pages that have child pages underneath them in a hierarchy) in page menus and lists. It affects the output of wp_list_pages and wp_page_menu, as well as all plugins and widgets that use those functions.
The plugin works by turning the parent page links into ‘dummy links’. That is, it replaces the href attribute on parent menu items with a ‘#’ (hash/pound) mark. A dummy link is just like a regular link, except that it leads back to the current page when clicked. The dummy links are given an inline style “cursor: default” to prevent the mouse pointer from turning into a hand when hovering over unlinked menu items.
Options
To configure the plugin options, go to the Settings menu in the WordPress admin panel and click on ‘Unlink Parent Pages’.
Use Dummy Links
Turned on by default as of Unlink Parent Pages version 1.3. If you uncheck this box, the plugin will unlink the parent pages by replacing the anchor tags with span tags. In some themes, this may cause problems with CSS styling. In order to fix this, you would need to add an additional selector to any rule that targets the anchor tags (see the FAQ for more information). If you are not experienced in writing CSS selectors, then it is strongly recommended to stick with dummy links.
Unlink Current Page
Unlink the current page, in addition to the parent pages.
Remove Link Titles
Remove the title attribute from the links (stops the tooltip from popping up when the mouse hovers over the menu items). This doesn’t have anything to do with unlinking parent pages, but it’s something a lot of people want, so I decided to include it.
Maximum Depth
The maximum depth setting controls how many levels in the hierarchy of pages are to be unlinked. It works exactly like the ‘depth’ option for wp_list_pages, as follows:
0 (default) Unlinks all parent pages, anywhere in the page hierarchy.
1 Unlinks top-level parent pages only.
2, 3, … Unlinks parent pages to the given depth.
-1 Do not unlink any pages (specify individual pages instead).
Unlink Specific Pages
You can specify which pages you want unlinked, using a comma-separated list of page IDs (example: 3,7,31). It works exactly like the ‘exclude’ option for wp_list_pages. If you want only the specified pages to be unlinked, then set max depth to -1.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Ambrosite Unlink Parent Pages」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
WC Unlink Downloadable Product Title 》此外掛可移除下載產品所寄送之電子郵件中的產品標題連結。, 這有助於消除顧客訂單中的混淆,只需取代該標題,而不用連結到產品。。
Delink Pages 》這個外掛可以讓你指定某些頁面在佈景主題使用 wp_list_pages() 函數列出連結時不會被包含在內。這可能會讓你在子頁面的標頭上加入連結,但又不希望標頭本身成...。
Ambrosite Unlink Parent Categories 》此外掛啟用後,將取消連結含有子分類的父分類於分類選單和列表中的連結。此外掛會影響 wp_list_categories 函數的輸出,以及所有使用此函數的其他外掛和小工...。