0
Wordpressのトップスライダーを私の2,3,4 ...のブログページでPHPで隠す方法はありますか?これは私のスクリプトです:最初のブログページ以外のブログページからスライダーを隠すにはどうすればよいですか?
<section id="blog">
<div class="owl-carousel">
<?php $loop = new WP_Query(array('post_type' => 'post', 'posts_per_page' => -1, 'orderby'=> 'ASC')); ?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<div class="recent-post">
<div class="home-slider-img">
<?php echo the_post_thumbnail(); ?>
</div>
<div class="feat-overlay">
<div class="feat-overlay-inner">
<div class="post-header">
<span class="cat"><?php the_category(', ') ?></span>
<h4><a href="<?php the_permalink(); ?>"><?php print get_the_title(); ?></a></h4>
<span class="date"><?php the_time('M j, Y') ?></span>
<p><a class="read-more" href="<?php print get_permalink($post->ID) ?>">Read More</a></p>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</section>
これは動作しませんが、これで試してみます: <?php if(!is_paged()){?> !ありがとうございました! –