[WordPress] 外掛分享: List Pages at Depth

首頁外掛目錄 › List Pages at Depth
WordPress 外掛 List Pages at Depth 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
100+
安裝啟用
尚無評分
2326 天前
最後更新
問題解決
WordPress 3.5+ v1.5 上架:2009-11-25

內容簡介

這是 wp_list_pages() 的一個更強大的版本,它允許您指定起始深度。

這意味著您可以輕鬆地在您的網站上分開顯示一級、二級和三級導航。

list_pages_at_depth 函數接受 wp_list_pages 的所有相同參數,但具有一個名為「startdepth」的額外參數。將其設置為 0 以顯示一級導航,設置為 1 以顯示二級導航,以此類推。如果您想顯示縮進的三級導航的次級導航,可以與 depth 參數一起使用此參數 - 僅需將 startdepth 設置為 1,depth 設置為 2 即可。

<?php

list_pages_at_depth( array(
'startdepth' => 1,
'depth' => 1
) );

?>

此外,該外掛還包括一個小工具,因此您可以輕鬆將其添加到您的網站中。

您可以在外掛的 GitHub 頁面上貢獻和提交 bug 問題。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.5) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「List Pages at Depth」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

A more powerful version of wp_list_pages() which allows you to specify a start depth.
This means you can easily display secondary and tertiary navigation seperately from the primary navigation on your site.
The list_pages_at_depth function accepts all the same arguments as wp_list_pages, but has an additional argument called ‘startdepth’. Set this to be 0 to display primary navigation, 1 for secondary navigation etc. If you wanted to display secondary navigation with indented tertiary navigation you can use this in conjunction with the depth argument – simply set startdepth to 1 and depth to 2.
1,
'depth' => 1
) );

?>

The plugin also includes a widget so you can easily add it to your site.
You can contribute and submit bug issues on the plugin’s GitHub page.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon