前言介紹
- 這款 WordPress 外掛「Custom Post Type Parents」是 2015-02-02 上架。
- 目前有 1000 個安裝啟用數。
- 上一次更新是 2025-01-18,距離現在已有 106 天。
- 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
- 有 6 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
mcguive7 | mightyminnow |
外掛標籤
menu | post | type | custom | Parent |
內容簡介
相容於 PHP 8.0
喜歡這個外掛嗎?請考慮留下五星評價。
此外掛旨在解決自訂內容類型的“父級”頁面在菜單和頁面列表中突顯顯示的問題。它可以與自訂菜單輸出以及使用page_css_class或nav_menu_css_class過濾器的任何功能,例如wp_list_pages()。當查看自定義內容類型時,指定的“父級頁面”將在導航菜單和頁面列表中以標準 WordPress 類別(例如,current_page_item)指示。
使用方法
在管理員中,導航到“設置”>“自定義內容類型父級”
對於每個自訂內容類型,使用下拉列表選擇一個“父級頁面”
菜單和頁面列表現在將應用於指定父頁面的適當類別。此外,如果已安装Simple Section Navigation,Custom Post Type Parents也會將這些類別應用於小工具。
類別
Custom Post Type Parents將以下類別應用於父母和祖先頁面(所有類別均與默認 WordPress 類別一致且向後兼容)。
Parent
* current-menu-parent
* current_page_parent
* current-custom-post-type-parent
* current-{post type}-parent
Ancestor
* current-menu-ancestor
* current_page_ancestor
* current-custom-post-type-ancestor
* current-{post type}-ancestor
原文外掛簡介
Compatible with PHP 8.2
Like this plugin? Please consider leaving a 5-star review.
This plugin is meant to solve the problem of highlighting “parent” pages for Custom Post Types in the menu and lists of pages. It integrates with custom menu output as well as output for any functions like wp_list_pages() that utilize the page_css_class or nav_menu_css_class filters. When viewing a custom post type, the assigned “parent page” will be indicated with standard WordPress classes (e.g. current_page_item) in navigation menus and lists of pages.
Usage
In the admin, navigate to Settings > Custom Post Type Parents
For each custom post type, use the dropdown to select a “parent page”
Menus and lists of pages will now have the appropriate classes applied to the specified parent pages. Additionally, Custom Post Type Parents will apply these classes to Simple Section Navigation widgets, if the plugin is installed.
Classes
Custom Post Type Parents applies the following classes to parent and ancestor pages (all classes are consistent with default WordPress classes and are backwards compatible).
Parent
* current-menu-parent
* current_page_parent
* current-custom-post-type-parent
* current-{post type}-parent
Ancestor
* current-menu-ancestor
* current_page_ancestor
* current-custom-post-type-ancestor
* current-{post type}-ancestor
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Custom Post Type Parents」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | trunk |
延伸相關外掛(你可能也想知道)
White Label CMS 》White Label CMS 外掛針對開發者設計,提供客戶更具個性化且易於使用的內容管理系統。, 詳細瞭解 2.0 版本外掛變更,請參閱 Video User Manuals 網站。, 功能...。
Simple Custom CSS Plugin 》無需麻煩地將自訂 CSS 新增到 WordPress 網站中。, 這是一個易於使用的 WordPress 外掛,可以添加自訂 CSS 樣式以覆寫外掛和佈景主題的預設樣式。該外掛旨在...。
ACF Photo Gallery Field 》t; 'Status', , 'name' => 'status', , 'choices' => array(, 'public' => 'Public', , 'private' => ...。
Smart Custom Fields 》Smart Custom Fields 是一個管理自訂欄位的簡單外掛。, 功能, , 支援自訂欄位群組迴圈。, 支援元資料修訂。, 支援元資料預覽。, , , 欄位類型, , 文字, 文字...。
Gallery Custom Links 》Gallery Custom Links 可讓您將相片連結到指定的 URL。已經過 WordPress 相片集、Gutenberg、Meow Gallery 等等的測試。官方網頁在這裡:Gallery Custom Link...。
Scripts n Styles 》這個外掛讓管理員用戶能夠將自訂的 CSS 和 JavaScript 直接添加到個別文章、頁面或任何註冊的自訂文章類型中,也可以將類別添加到 body 標籤和文章容器中。還...。
Ocean Custom Sidebar 》這個 WordPress 外掛可以生成無限數量的側邊欄,您可以把它們放置在想要的任何頁面上。前往主題面板 > 側邊欄以創建自定義側邊欄。, 此外掛需要安裝 Ocean...。
SMK Sidebar Generator 》這個外掛可以生成任意數量的側邊欄,然後讓你將它們放置在你想要的任何頁面。, , 特色:, , 無限數量的側邊欄。, 使用條件替換預設主題側邊欄,或全局替換只...。
Custom Block Builder – Lazy Blocks 》WordPress 自訂區塊外掛程式, ★★★★★, 開發商使用於 WordPress 自訂區塊的魔法棒。我們創建了 Lazy Blocks WordPress 外掛程式,協助每位開發商取得他們需要的...。
Custom Body Class 》這個外掛程式可供您為頁面或文章添加獨特的 CSS 類別。, 範例, TasteWP 已經準備好一個快速的 WordPress 實例來展示此外掛程式,您可以在 此範例 中試用它。,...。
Woo Custom Stock Status 》此外掛可用於為每個 WooCommerce 產品或全域編寫自定義庫存狀態,並為每種狀態文字設置不同的顏色以便讓使用者在產品詳細頁面中確切知道庫存狀態名稱。, 您可...。
PixTypes 》, , 使用 PixTypes,您可以允許您的主題在啟用時定義自定義文章類型或元框。 , 注意:此外掛針對開發人員,如果沒有正確配置,它將不會執行任何操作。。
Meks Time Ago 》Meks Time Ago WordPress 外掛讓您可以輕鬆將文章日期顯示改為「多久以前」的格式,例如「1小時前」、「2週前」、「5個月前」、「4天前」等,同時提供多種選...。
All Meta Tags 》這是一款易於使用、界面直觀的 WordPress 外掛程式,可以讓您輕鬆而安全地在 WordPress 管理區中直接添加自訂 Meta 標籤,而無需使用外部編輯器。, , 此工具...。
Post/Page specific custom CSS 》「Post/Page specific custom CSS」外掛能讓你為特定的文章或頁面新增 CSS 樣式表,並在編輯文章/頁面的欄位中提供一個區域來貼上你的 CSS 代碼。您也可以決...。