wp_list_pages – only want children to top level
I got a problem, and i dont really know how to take care of it. Appreciate any insight into this delicious problem (or at least, it is for me).
I have a main menu with 5 subpages at the top. They have some children, which have a few children.
Under my mainmenu i have a subpages menu thats supposed to display subpages whose parent is toplevel.
I dont know how to do that. I only want pages whose parent is the top to be displayed. As it is know even third level pages are display if i go that deep.
If this doenst make any sense to you at all have a look at http://www.ufstockholm.se
What im using now is
if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&depth=1"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1");
Im yet to master the post_parent, please help me! 🙂
- The topic ‘wp_list_pages – only want children to top level’ is closed to new replies.