• Is there a way i can get the pages and subpages like the wp_list_pages but then i would like to store them in my own variable so i can use that in my own php function…

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Darklandz

    (@darklandz)

    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 …

    Thread Starter Darklandz

    (@darklandz)

    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.

    Thread Starter Darklandz

    (@darklandz)

    Ah thanks for the Wingrep tip, just installed it ??

    Thread Starter Darklandz

    (@darklandz)

    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 …

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_list_pages customize …’ is closed to new replies.