Home > Archives > 2008-05-08
2008-05-08
ページレイアウトを調整してみた ーその2ー
- 2008-05-08 (木)
- 未分類

wp_list_pagesを眺めながら、サイドバーで固定ページの一覧とトップにページナビを表示している部分を見比べると
ページナビは
wp_list_pages('sort_column=menu_order&title_li=0&depth=1');
サイドバーは
wp_list_pages('sort_column=menu_order&title_li=0');
depth (integer)
This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by wp_list_pages. The default value is 0 (display all pages, including all sub-pages).* 0 - Pages and sub-pages displayed in hierarchical (indented) form (Default).
* -1 - Pages in sub-pages displayed in flat (no indent) form.
* 1 - Show only top level Pages
* 2 - Value of 2 (or greater) specifies the depth (or level) to descend in displaying Pages.
ページナビで指定しているdepthの値を0に書き換えて表示させると

WP2.5系ってjQueryを使うようになっているので(読み込んでないけど)親ページにマウスが乗った時だけ子ページがずるずる出てくるとかもちょっとがんばれば出来そうですね
備考
ページ構成を整理して子孫がある親ページには必ず子孫へのリンクを記述しておけばなにも直す必要がありませんね
関連記事
- Comments: 0
- Trackbacks: 0
Home > Archives > 2008-05-08
- Search
- Feeds
- Meta
フィードメーター
あわせて読みたい
BlogScouter
携帯サイト
なかのひと
広告

