LoginSignup
0
0

More than 3 years have passed since last update.

【Wordpress】特定のカスタム投稿タイプの記事を呼び出し(コピペ用)

Last updated at Posted at 2021-05-19
<?php
$query = new WP_Query(
    array(
        'post_type' => 'カスタム投稿タイプ',
    )
);
?>
<?php
if ( $query->have_posts() ) : ?>
        <?php while ( $query->have_posts() ) : $query->the_post();?>
            <!--ここにループさせたい内容-->
        <?php endwhile; ?>
<?php endif; wp_reset_postdata(); ?>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0