Ich habe es hingekriegt. Der Fehler war, dass ich in Pinegrow ,Continue previous Loop' angewählt hatte. Das störte den Loop.
PHP
<?php
get_header(); ?>
<section class="">
<?php
$singlearticle_args = array(
'post_type' => 'post',
'post_status' => 'publish',
'nopaging' => true
)
?>
<?php $singlearticle = new WP_Query( $singlearticle_args ); ?>
<?php if ( $singlearticle->have_posts() ) : ?>
<?php $singlearticle_item_number = 0; ?>
<?php while ( $singlearticle->have_posts() && $singlearticle_item_number++ < 1 ) : $singlearticle->the_post(); ?>
<article class="posta post-single">
<div class="row">
<div class="columns medium-12">
<h1 class="post-title"><?php the_title(); ?></h1>
</div>
</div>
<div class="row padding-bottom">
<div class="columns medium-12">
<?php the_post_thumbnail( 'large', array(
'class' => 'size-secondary-featured-thumbnail'
) ); ?>
</div>
</div>
<div class="post-content">
<div class="row">
<div class="columns medium-12">
<?php the_content(); ?>
</div>
</div>
</div>
</article>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</section>
<section class="">
<div class="row">
<?php if ( $singlearticle->have_posts() ) : ?>
<?php while ( $singlearticle->have_posts() ) : $singlearticle->the_post(); ?>
<article class="medium-4 columns">
<a href="<?php echo esc_url( the_permalink() ); ?>">
<div class="post-entry-slide-img">
<?php the_post_thumbnail( null, array(
'class' => 'bg-img-fullsize'
) ); ?>
</div>
<h1 class="post-entry-title"><?php the_title(); ?></h1>
</a>
</article>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
</section>
<?php get_footer(); ?>
Alles anzeigen