更新のチェックはget_the_modified_date??
<?php $today7 = date("Y-m-d", strtotime("-7 day")); if( $today7 < get_the_modified_date()) { $icon =' <img src="http://xxx/up.png" align="middle" style="vertical-align: baseline;">';} if($today7<get_the_date()){$icon =' <img src="http://xxx/new.png" align="middle" style="vertical-align: baseline;">';} ?> <?php $myQuery = new WP_Query(); $args = array( //サイトに合わせて変更 'posts_per_page' => '5', 'post_type' => 'post', 'ignore_sticky_posts' => 1,//先頭に固定表示を無視 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC'//新しい記事順 ); $myQuery->query($args); ?> <?php if($myQuery->have_posts()): while($myQuery->have_posts()) : $myQuery->the_post(); ?> <?php echo $icon;?>//マークを表示 <?php endwhile; endif; wp_reset_postdata(); ?>