menu_order の何が問題なのかわかりませんが、投稿が思い通りに表示されません。ここに私が意味するものがあります
私のブログには3つの記事があります。これはdbがどのように見えるかです
id ..... menu_order
56 ..... 2
59 ..... 5
65 ..... 3
index.php (私のカスタム テーマ)
画像のみを表示したいので、使用するコードは次のとおりです
<?php while ( have_posts() ) : the_post();
$images = get_children(
array( 'post_parent' => $post->ID,
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'menu_order',
'order' => 'DESC',
'numberposts' => 999 )
);
if( $images )
{
$total_images = count( $images );
$image = array_shift( $images );
echo wp_get_attachment_image($image->ID, 'full', 0, array('id' => 'photo'));
}
endwhile; // end of the loop.
?>
問題は、投稿が id 65,59,56 で順番に表示され、59,65,56 とは異なることです。
これの何が問題なのですか?