前言介紹
- 這款 WordPress 外掛「List Pages Shortcode」是 2009-03-03 上架。
- 目前有 6000 個安裝啟用數。
- 上一次更新是 2023-02-21,距離現在已有 803 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.4.0 以上版本才可以安裝。
- 有 14 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
husobj | aaron_guitar |
外掛標籤
pages | list pages | shortcodes | child pages | sibling pages |
內容簡介
介紹了 [list-pages]、[sibling-pages] 和 [child-pages] 短碼,方便在文章中顯示頁面清單。這兩個短碼可以接受您傳遞給 wp_list_pages() 函數的所有參數,此外還添加了一個 class 參數。
使用範例
按標題排序頁面清單
[list-pages sort_column="post_title"]
列出頁面但排除某些 ID,並將清單的 class 設置為「my-page-list」
[list-pages exclude="17,38" class="my-page-list"]
顯示文章摘要(對於不存在摘要支援的頁面,需要手動添加或通過 Page Excerpt 外掛程式添加)
[list-pages excerpt="1"]
列出當前頁面的子項,但僅顯示頂層
[child-pages depth="1"]
列出當前頁面的同級頁面及其子頁面
[sibling-pages depth="2"]
預設引數
預設值與 wp_list_pages() 函數相同,除了 title_li 預設為空。如果沒有指定 class,UL 標籤會自動分配一個預設的 class,分別為「list-pages」、「sibling-pages」或「child-pages」。此外,echo 參數沒有效果。
除了 wp_list_pages() 的參數外,您還可以指定:
list_type(字串)清單標籤,預設為
- 。
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「List Pages Shortcode」來進行安裝。
exclude_current_page(整數)排除當前頁面。預設為 0。
excerpt(整數)顯示頁面摘要。預設為 0。
原文外掛簡介
Introduces the [list-pages], [sibling-pages] and [child-pages] shortcodes for easily displaying a list of pages within a post or page. Both shortcodes accept all parameters that you can pass to the wp_list_pages() function with the addition of a class parameter.
Example Usage
List pages sorted by title
[list-pages sort_column="post_title"]
List pages but exclude certain IDs and set the class of the list to “my-page-list”
[list-pages exclude="17,38" class="my-page-list"]
Show excerpt (for pages excerpt support will need adding manually or via the Page Excerpt plugin)
[list-pages excerpt="1"]
List the current page’s children, but only show the top level
[child-pages depth="1"]
List the current page’s siblings and their subpages
[sibling-pages depth="2"]
Default Arguments
The default values are the same as for the wp_list_pages() function except for title_li which defaults to nothing. If a class is not specified, a default class of either “list-pages”, “sibling-pages” or “child-pages” is given to the UL tag. In addition, the echo parameter has no effect.
In addition to the wp_list_pages() arguments, you can also specify:
list_type (string) List tag. Defaults to
- .
exclude_current_page (int) Exclude the current page. Defaults to 0.
excerpt (int) Show the page excerpt. Defaults to 0.
各版本下載點
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.7.1 | 1.7.2 | 1.7.3 | 1.7.4 | 1.7.5 | 1.7.6 | 1.7.7 | trunk |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。