wordpress - Creating sub nav using wp_list_pages(); -


i'm using following code produce list of pages bottom 2 levels of wordpress page hierarchy:

<?php if($post->ancestors){     $ancestors = end($post->ancestors);     $children = wp_list_pages("title_li=&child_of=".$ancestors.""); } ?> 

this seems bring in pages higher last 2 levels though. there can add the code above make list bottom 2 level pages?


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -