我创建了foreach循环来显示post图像,但它从最后一个到第一个显示这些图像,如何使其从第一个到最后一个显示;)?
<?php $args = array(
\'post_type\' => \'attachment\',
\'numberposts\' => -1,
\'post_status\' => null,
\'post_parent\' => $post->ID
);
$attachments = get_posts( $args );
if ( $attachments ) {
foreach ( $attachments as $attachment ) : ?>
<p>
<?php echo wp_get_attachment_image( $attachment->ID, \'full\' ); ?>
</p>
<?php endforeach;
}
?>