Always ->first()

All articles are class=“first”

Where is my failure?

 <?php foreach($page->children()->listed()->flip() as $article): ?>
            <article class="<?php e($article->first(), 'first') ?>">
                <div class="post-credits">
                    <p class="normal-font"><?php if($user = $article->author()->toUser()): ?>
                    <?= $user->firstname() ?> <?= $user->surname() ?>
                    <?php endif ?></p>
                    <p class="normal-font"><?= $article->date()->toDate('d.m.Y') ?></p>
                <div class="post-title">
                    <div class="normal-font"><?= $article->title()->html() ?></div>
                <div class="post-image">
                    <?php if ($image = $article->picture()->toFile() ) : ?>
                        <img src="<?= $image->url() ?>" class="img-fluid">
                    <?php endif; ?>
                <div class="post-text">
                    <p><?= $article->text()->excerpt(300) ?></p>
                    <a href="<?= $article->url() ?>">Read more…</a>
        <?php endforeach ?>

first() is not page method, but a collection method, so you would have to compare the current $article object with the first object of your collection:

$articles = $page->children()->listed()->flip();
foreach ($articles as $article): ?>
            <article class="<?php e($article === $articles->first(), 'first') ?>">
<?php endforeach ?>

Always right Sonja! :wink:

Fixed, Working, Thanks!