WordPress: Consultas SQL a la base de datos

global $wpdb;

$result = $wpdb->get_results ( "
    SELECT *
    FROM  $wpdb->posts
        WHERE post_type = 'page'
"
);

foreach ( $result as $page )
{
   echo $page->ID.'<br/>';
   echo $page->post_title.'<br/>';
}
post-author