我遵循这种方法getting images from the media library.
// get the first image attached to the current post
function aldenta_get_post_image($size = \'thumbnail\') {
global $post;
$photos = get_children( array(\'post_parent\' => $post->ID, \'post_status\' => \'inherit\', \'post_type\' => \'attachment\', \'post_mime_type\' => \'image\', \'order\' => \'ASC\', \'orderby\' => \'menu_order ID\') );
if ($photos) {
$photo = array_shift($photos);
return wp_get_attachment_image($photo->ID, $size);
}
return false;
}
但是我想把结果分页,我该怎么做呢?