Home > 未分類 > ページレイアウトを調整してみた ーその2ー

ページレイアウトを調整してみた ーその2ー

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

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://natu-n.com/2008/05/08_20149.php/trackback
Listed below are links to weblogs that reference
ページレイアウトを調整してみた ーその2ー from AFTER THE RAIN

Home > 未分類 > ページレイアウトを調整してみた ーその2ー

Search
Feeds
Meta

フィードメーター

フィードメーター - AFTER THE RAIN
Bloglinesで閲読登録
ADD TO Hatena::RSS
Subscribe with livedoor Reader
Add to Google

あわせて読みたい

あわせて読みたいブログパーツ

BlogScouter

携帯サイト

QRcode:home

なかのひと

広告

Return to page top