Support » Fixing WordPress » Only List 2nd level pages, not 1st or 3rd
7 years, 8 months ago
I thought this would be simple but I just can’t seem to pull it off. I have 3 levels of pages, Parent, Child, Grandchild. I just want to display the 2nd level pages, ie, child pages.
Can anybody point me in the right direction here?
Try using the child_of parameter with wp_list_pages.
7 years, 5 months ago
That is a big issue to me as well. I want a solution ;(
esmi, that’s not the solution!
$string = wp_list_pages('title_li&echo=0');
if (preg_match('#^.*?<ul>.*?<ul>.*?(\s*<ul>.*?</ul>)#is', $string, $matches))