The wp_list_pages()
function uses get_pages()
, which accepts a post_type
argument-array key, so you can use that same argument array key in `wp_list_pages():
<?php
wp_list_pages( array(
'post_type' => 'casestudy'
) );
?>
Unfortunately, it looks like the post_type
value must be a string, rather than an array (that is, if I'm reading the source correctly); which means that wp_list_pages()
can only handle one post-type at a time. If you need to list all in one menu, you could try concatenating them:
<?php
$pagelist = wp_list_pages( array(
'include' => '154, 136',
'title_li' => '',
'sort_column' => 'ID',
'sort_order' => 'DESC',
'depth' => '1'
'echo' => false
) );
$casestudylist = wp_list_pages( array(
'post_type' => 'casestudy',
'title_li' => '',
'echo' => false
) );
$concatenatedlist = $pageslist . $casestudylist;
?>
<ul>
<?php echo $concatenatedlist;
</ul>
Codex references: