Categories

Get a list of pages

To obtain a list of pages you can use wp_list_pages. In addition to this you can also specify the page ID and the amount of levels of sub-pages that you want to retrieve but using child_of and depth.

<!--?php
	require('wp-blog-header.php');
	define('WP_USE_THEMES', false);
	$children = wp_list_pages('title_li=&#038;child_of=942&#038;echo=1&#038;depth=0');
 
  	if ($children) {
		print_r($children);
	}
?-->

Comments are closed.