【WP】WP_Query
2021年7月13日
$args = array(
'post_type' => array('post','category'),
'posts_per_page' => -1
);
$custom = new WP_Query($args);
while($custom->have_posts()) : $custom->the_post();
echo 'ループ内容';
endwhile;
wp_reset_query();
2021年7月13日
$args = array(
'post_type' => array('post','category'),
'posts_per_page' => -1
);
$custom = new WP_Query($args);
while($custom->have_posts()) : $custom->the_post();
echo 'ループ内容';
endwhile;
wp_reset_query();