もくじ


global $post;
$tmp_post = $post;
$category_ids = array( '3','11','6','7','9','10','2' ); //カテゴリーIDを指定
$numberposts = ''; //一覧表示したい記事数を数字で指定
foreach ( $category_ids as $category_id ) {
?>

    $postslist = get_posts( "category=$category_id&numberposts=$numberposts&order=DESC&orderby=date" );
    foreach ( $postslist as $post ) {
    ?>

  • ID ); ?>>post_title; ?>
  • }
    ?>

}
$post = $tmp_post;
?>