Pages are by default children of the main page (or the root).
There are several ways to list them:
Edit the front-page.php of your theme and use wp_list_pages().
To show just the first level of the pages use:
wp_list_pages( array ( 'depth' => 1 );
Pro: Easy to implement. Contra: not very flexible.
Add a widget to your front-page.php and use the page widget. You need the following code in your functions.php:
.
function wpse_42387_sidebar_setup()
{
register_sidebar(
array (
'name' => 'Front Page'
, 'id' => 'front-page-widget'
, 'before_widget' => '<div id="%1$s" class="widget %2$s">'
, 'after_widget' => '</div>'
, 'before_title' => '<h2>'
, 'after_title' => '</h2>',
)
);
}
add_action( 'widgets_init', 'wpse_42387_sidebar_setup' );
In your front-page.php add:
<?php dynamic_sidebar( 'Front Page' ); ?>
Now you can add a widget from wp-admin/widgets.php to the field, even a custom menu.
3. You use the shortcode from my short code plugin and add [subpages] to the page you’ve chosen as front page. The arguments are like wp_list_pages().
In all cases you don’t need to query the data base with a custom function.