日本語

global $post;

$tmp_post = $post;

$category_ids = array( '40' ); //カテゴリー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;

?>

Remove all ads