hmm this outputs with html code … i was looking for a way to get the pages in an array so if i do :
echo $mypages(0) should get Home and so on …
anyone ? been searching for a few hours …
Then look at $pages = get_pages();
When looking for things like that use WinGrep to look for a known value, like ‘function wp_list_pages’ and then look through that to see how the developers do to get the pages.
Ah thanks for the Wingrep tip, just installed it 🙂
Hmm i’m stuck …
I’m trying to incorporate this as my page navigation tabs
i made a function in my template functions.php :
function DarkPageNav(){
$output = '';
$pages = wp_list_pages('sort_column=menu_order&depth=1&title_li=');
if ($pages) {
$output .= '<li>'.$pages;
$children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
if ($children) {
$output .= '<li>'.$children.'</li>';
}
$output .= '</li>';
}
return $output;
}
if you look on my site it only shows the pages tabs but not if it has subpages …
If you check here (just plain html no code here) that is the result i would like to get …