开发者

WordPress 2nd level subpages

I have this structure in my WP pages.

ho开发者_如何学Pythonme
  --submenu
    -- submenu 1
  --submenu
    -- submenu 1
  --submenu
    -- submenu 1
  --submenu
    -- submenu 1
  --submenu
    -- submenu 1

how do i get all the submenu 1 items? using wp_list_pages? i tried using parameter depth =2 but it wont give me the sub-menu 1 items.

can anybody help me? any help would be appreciated.

thanks,


The submenu 1 items are grandchildren of home and WordPress makes grandchildren hard to deal with for some reason. So assuming you know the page ID of home, the following code can be adapted to return all of the grandchildren:

http://pastebin.com/drsxdBGY

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜