Wow. This one is driving me batty! I've spent two long nights on this so far (because i'm stubborn and like to figure things out on my own)... but I give up... so, I'm asking for specific help here. I have tried everything mentioned on this forum in regards to "wp_list_pages" and "sub-navs" and "child_of", etc. I've also tried out the wonderful plugin that Adi listed above, in addition to this one:
I still haven't found a solid solution for what I need my site to do. This is a site I created for a friend of mine, it's located here temporarily: http://thebeadedrose.com.
All pages on the site are individual "Pages" and "Sub-Pages."
I was able to get the main nav working finally by using this bit of code in my header:
<?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
So far, so good.
The problem comes in with my sub-pages. The only ones I have setup now on the test site are under "Company".....
Problem #1 -
If you click on either of the 2 sub-pages, the sub-nav disappears, the warning appears, and also the "hit state" in the main nav goes away.
Problem #2 -
If you click around the rest of the site... you'll see the warning is displayed on every page that has no "children" or subpages.
This is the code I'm using in the sidebar to display a Page's children:
<?php wp_list_pages('child_of=' . $page_id . '&title_li=<h3>' . __('Pages') . '</h3>' ); ?>
I thought about doing an "if/else" statement in the sidebar... something that says "If Page has no child... end.... else, display the children"... but it also needs to say "If Page IS a child itself, display the siblings."
I love WordPress, but I'm still trying to wrap my head around PHP.
Thanks for any clues,