前言介紹
- 這款 WordPress 外掛「Category Posts in Custom Menu」是 2011-11-07 上架。
- 目前有 2000 個安裝啟用數。
- 上一次更新是 2024-11-04,距離現在已有 181 天。
- 外掛最低要求 WordPress 5.4 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 43 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
anaid |
外掛標籤
menu | Dynamic | submenu | category | automatic |
內容簡介
此外掛可讓你列出屬於分類法(類別、標籤等)的文章和頁面,並自動替換為文章和頁面本身,並且也支援自訂分類法和自訂文章類型!相容PHP 7.0。
使用方法
啟用此外掛後前往外觀 > 選單加入分類法(類別/標籤/自訂)至選單中。接著你可以選擇是否要替換原本的連結(列出專屬頁面的所有項目)為文章頁面本身。
對於選單中的每個類別和標籤項目,你現在擁有以下額外設定選項:
在選單中是否用文章列表替換連結 y/n;
指定你希望顯示您此項目的文章數量上限(-1 =全部,0也可);
依據文章的ID、作者、標題和其他屬性遞增或遞減排序。請見「其他說明 > 排序」;
保留或刪除原先的選單項目(總是/僅在沒有文章時/不顯示);
指定選單項目的標題。你可以使用%post_title、%post_author和其他特殊字元,請見「其他說明 > 特殊字元」。
細節
此外掛使用wp_nav_menu_objects過濾器勾選來刪除和取代選單中的分類法項目。它擴展Walker_Nav_Menu_Edit以添加輸入字段到外觀 > 選單,並添加一些CSS樣式以適當的樣式顯示。
此外掛現在支援wp_nav_menu_item_custom_fields鉤子點,並且應與其他使用此鉤子點的外掛相容。
特殊字元
你可以使用以下特殊字元來控制此外掛所生成的選單項目的標題:
%post_title
%post_author
%post_featured_image_url
%post_featured_image(插入具有特色圖像的HTML「img」標籤,如果沒有圖像則為無)
%post_featured_image_thumb_url
%post_featured_image_thumb(插入具有特色圖像縮略圖的HTML「img」標籤,如果沒有圖像則為無)
%post_excerpt
%post_url
%post_date用於未格式化的文章日期:2012-11-10 18:14:23
%post_date()用於帶有以下預設格式的格式化文章日期:2012年11月10日
%post_date(
%post_date_gmt
%post_date_gmt()
%post_date_gmt(
%post_status
%post_modified
%post_modified()
%post_modified(
%post_modified_gmt
%post_modified_gmt()
%post_modified_gmt(
%post_comment_count
自訂文章欄位的特殊字元,例如%post_my_field,其中「我的欄位」或「my_field」是自訂欄位
以下特殊字元已被廢止:
%post_feat_image(僅限URL)
%post_feat_image_thumb(僅限URL)
排序
你可以依據以下屬性遞增或遞減排序,來控制選單項目的排序:
無排序
ID
作者
標題
日期
上次修改日期
原文外掛簡介
The default custom menu in WordPress only allows adding a link that leads to a list of posts and pages belonging to a taxonomy (category, tag, etc). If you want to list the posts and pages themselves and if you want WordPress to do this automatically for you, then I hope you will find this plugin useful.
Also works for custom taxonomies and custom post types
NEW: CPCM V3 now provides support for Full Site Editing with the Gutenberg Block Editor
WARNING: Coming from version 1.x? There are breaking changes, read the changelog before upgrading.
Using it
Enable the plugin and go to either Appearance > Menus or Appearance > Customize or Appearance > Editor. Add a category (or other taxonomy like tag or custom) to the menu. Next, you can choose if you would like to replace the category by the posts or pages themselves.
For each Category in your menu, you now have the following extra configuration options:
Replace by posts in the category y/n;
specify the (maximum) number of posts you want to show for this item (max 10);
their ordering ascending or descending by Title, Date or Menu Order;
specify the title for the menu items. For this you can use %post_title, %post_author and other wildcards, see ‘Other Notes > Wildcards’. Default value: %post_title
Wildcards
You can control the title of the menu items generated by the plug-in with the following wildcards:
%post_title
%post_author
%post_date for the unformatted post date: 2012-11-10 18:14:23
%post_date() for a formatted post date with the following default formatting: November 10th, 2012
%post_date(
%post_date_gmt
%post_date_gmt()
%post_date_gmt(
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Category Posts in Custom Menu」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
2.0.0 | 2.1.0 | 2.1.1 | 2.1.2 | 3.0.0 | 3.0.1 | 3.0.2 | 3.0.3 | trunk |
延伸相關外掛(你可能也想知道)
Dynamic Conditions 》Dynamic Conditions 是一個 Elementor 外掛,加入了條件邏輯來顯示或隱藏不同元素。該外掛將條件添加到動態標籤中,以顯示/隱藏小工具或區塊。, 此外掛需要 E...。
Dynamic Visibility for Elementor 》Dynamic Visibility 擴充套件讓您可以隱藏小工具、欄位、容器、區段或頁面。, 當您正在建立不想向所有人展示的內容時,這尤其有用。, 這是一個 Elementor 的...。
Login or Logout Menu Item 》透過這個外掛,您可以在 WordPress 網站的任何選單上輕鬆添加動態的登入/登出選單項目。該選單項目將根據當前使用者是已登入或未登入而變更。您還可以設置特...。
Dynamic "To Top" Plugin 》這個 WordPress 外掛可新增一個自動的動態「回到頂部」按鈕,方便使用者輕易捲回長頁面的頂部。, 外掛有一個直覺式控制面板,可以針對每個網站的需求進行風格...。
Fly Dynamic Image Resizer 》進入 Github 倉庫 ♥, 主題開發人員最大的問題之一是多個圖片尺寸的問題。當您在媒體庫上傳圖像時,WordPress 根據您使用 add_image_size() 定義的所有圖像尺...。
JC Submenu 》JC子選單外掛允許你自動填入自定義的文章類型、分類或子頁面到導覽選單中。此外掛容易使用,並被設計成為一個輕量化的選單擴充套件。, 透過我們的進階子選單...。
Add Posts to Pages 》這個非常輕量的 WordPress 外掛可以輕鬆地將文章添加到頁面上。您可以在頁面的任何位置添加它們(頂部、中間、底部),每個位置同樣容易。, 只需要選擇:, , ...。
Dynamic Animations for Elementor 》這是一個 Elementor 的外掛程式,因此在啟用插件之前必須先安裝免費的 Elementor。, 對於每個小工具,您可以設置許多高級且令人難以置信的效果和動畫。, 查看...。
WP Dynamic Keywords Injector 》WP Dynamic Keywords Injector 是一個外掛,它可以在瀏覽器的地址欄中插入頁面所需的關鍵字。如果關鍵字未在 URL 中給出,則會使用規則轉換後的關鍵字,如果...。
SlideDeck 2 Lite Responsive Content Slider 》我們已經推出SlideDeck Lite的全新升級版- SlideDeck |版本5, 新版本提供了更好的即插即用架構,讓您可以建立和自定義圖像和視頻輪播。, 在此查看豐富的Slide...。
Dynamic Year Block – display a copyright notice in your footer with the current year 》動態年份區塊能自動更新網站頁腳中的版權年份。在每年交替之際,該數字會自動更改以反映當前年份,不必手動編輯每個新年’s eve時的年份。, 此外掛適用...。
Dynamic Copyright Year 》新年版權更新即時更新, 將新年年份更新從您的清單中除去。由5星級插件所開發的Dynamic Copyright Year,可以檢測網站頁尾中的版權年份,並根據訪問者的本地時...。
SlideDeck 1 Lite Content Slider 》棄用注意事項, SlideDeck 1 Lite for WordPress已經棄用。從2013年3月13日起,我們將不再更新此外掛,但我們建議您考慮使用 SlideDeck 2 Lite for WordPress...。
Dynamic Image Resizer 》通常情況下,當您在 WordPress 網站上上傳圖像時,系統會自動創建幾個不同大小的圖像版本。主題還可以定義自定義圖像大小,增加伺服器上生成的圖像數量。, 這...。
ACF: Dynamic Year Select Field 》這個外掛可以輕鬆建立一個年份下拉選單。此外掛相容於Advanced Custom Fields 4和5。, 以下是一些可能的使用情境:, , 選擇信用卡到期日, 設定最小年齡(18歲、...。