-
'news', // 投稿タイプを指定
'posts_per_page' => 1,
'paged' => $paged, // 表示するページ数
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'news_category',
'field' => 'slug',
'terms' => 'sauna',
),
),
);
$posts2 = get_posts($args);
$wp_query = new WP_Query( $args);//WP_Queryをインスタンス
?>
have_posts() ) :$wp_query->the_post(); ?>
-
ID, 'news_category'); foreach($terms as $term){echo $term->name;}; ?>
-
'news', // 投稿タイプを指定
'posts_per_page' => 1,
'paged' => $paged, // 表示するページ数
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'news_category',
'field' => 'slug',
'terms' => 'golf',
),
),
);
$posts2 = get_posts($args);
$wp_query = new WP_Query( $args);//WP_Queryをインスタンス
?>
have_posts() ) :$wp_query->the_post(); ?>
-
ID, 'news_category'); foreach($terms as $term){echo $term->name;}; ?>
-
'news', // 投稿タイプを指定
'posts_per_page' => 1,
'paged' => $paged, // 表示するページ数
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'news_category',
'field' => 'slug',
'terms' => 'base',
),
),
);
$posts2 = get_posts($args);
$wp_query = new WP_Query( $args);//WP_Queryをインスタンス
?>
have_posts() ) :$wp_query->the_post(); ?>
-
ID, 'news_category'); foreach($terms as $term){echo $term->name;}; ?>



