functions.phpに以下を追加 function get_the_post_image_src($postid,$size,$order=0,$max=null) { $attachments = get_children(array('post_parent' => $postid, 'post_type' => 'attachment', 'post_mime_type' => 'image')); if ( is_array($attachments) ){ foreach ($attachments as $key => $row) { $mo[$key] = $row->menu_order; $aid[$key] = $row->ID; } array_multisort($mo, SORT_ASC,$aid,SORT_DESC,$attachments); $max