內容簡介
使用 HTML 註釋列出當前頁面的子頁面或同層頁面的鏈接。
通常用於使用 WordPress 作為簡單 CMS 的內容網站。一些內容分層需要概述頁面,然後是多個子頁面,例如服務頁面。
使用以下短代碼來列出當前頁面的子頁面和 / 或同層頁面:
當前頁面的子頁面按字母順序排序:
[list_children sort_column=”page_title” sort_order=”asc”]
當前頁面的同層頁面按選單順序(降序)排序:
[list_siblings sort_column=”menu_order” sort_order=”desc”]
您可以使用 wp_list_pages() 調用中的大多數屬性:https://codex.wordpress.org/Function_Reference/wp_list_pages
以下將不再適用(已棄用):
<ul>
<!–list_children()–>
</ul>
外掛標籤
開發者團隊
原文外掛簡介
Use an HTML comment to list links of the current page’s children or siblings.
Common usage is for content sites utilizing WordPress as a simple CMS. Some content hierarchies call for an Overview page followed by multiple subpages, for example, a Services page.
Use the following shortcodes to list children and or siblings of the current page:
Alphabetical listing of current page’s children:
[list_children sort_column=”page_title” sort_order=”asc”]
List of current page’s siblings, ordered by menu order (descending):
[list_siblings sort_column=”menu_order” sort_order=”desc”]
You can use a majority of the attributes from the wp_list_pages() call: https://codex.wordpress.org/Function_Reference/wp_list_pages
The following will no longer work (deprecated):
