php - wp_list_pages as text not link -
im doing follow children of page im administrating:
$args = array( 'depth' => 0, 'child_of' => get_the_id(), 'title_li' => '', 'echo' => 0, ); wp_list_pages($args);
the output title of subpages , linked, wish serperate title , link output "http://thelink.com title".
is possible?
regards, emil
here go, enjoy
if $post->id
, get_the_id()
same use $post->id
global $post; $currentpageid = $post->id; $childpages = get_pages('sort_column=menu_order&hierarchical=0&parent=' . $currentpageid . '&exclude='); foreach ($childpages $page){ echo "child page id: ".$page->id ."<br>"; echo "child page name: ".$page->post_title ."<br>"; }
Comments
Post a Comment