我对“posts\\u per\\u page”有问题-无论我将其设置为10或0,它总是只显示一篇文章!
<?php $loop = new WP_Query( array( \'post_type\' => \'producenter\', \'posts_per_page\' => 0, \'orderby\' => \'rand\', \'post__not_in\' => array($post->ID) ) ); ?>
<p class="loop__title">Andre leverandører:</p>
<ul class="grid__content small">
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail(); ?>
<h4><?php the_title(); ?></h4>
<?php if( get_field( "deloverskrift" ) ): ?>
<p><?php the_field( "deloverskrift" ); ?></p>
<?php endif; ?>
</a>
</li>
<?php endwhile; ?>
</ul>