<ul>
<?php $args = array(
        'posts_per_page'   => 5,
        'category_name'    => 'news',
        'orderby'          => 'date',  //日付順
        'order'            => 'DESC', //降順
        'meta_key' => 'ACF',
        'meta_value' => '値',
        'meta_compare' => 'LIKE'//'LIKE','NOT LIKE','IN','NOT IN'
          );
$my_query = new WP_Query($args);
if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post();
?>
 
<li><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
 
<?php endwhile; endif; wp_reset_postdata(); ?>
</ul>


おすすめの記事