I display a large number of images divided on several pages using pagination. Additionally, the images can be filtered using tags.
Now I want to display a section with a randomly selected background image above the list of images. But only on the first page and only if no filter is active.
I have managed that the section is only displayed on the first page:
<?php if ($pagination->isFirstPage()) : ?>
<?php $imageUrl = ($image = page('archive')->children()->images()->filterBy('orientation', 'landscape')->shuffle()->first()) ? $image->url() : ''; ?>
<section class="cover" style="background-image: url(<?= $imageUrl ?>)">
...
</section>
<?php endif ?>
How can I now also integrate the second condition, i.e. show the section only when no filter is active?