Invalid argument - Not sure why

Hey Everyone, So everything has been working smoothly on a project I’m working on but i just ran into this problem and don’t know what I did. Im trying to specify a folder to look for visible folder in by using

<div class="container cf">
        <?php foreach(pages('Seasonal_Images')->visible() as $project): ?>
            <a href="<?php echo $project->url() ?>">        
            <div class="day grid columns">
                <h5><?php echo ($project->title()) ?></h5>

But now I’m getting this error when the page loads.

Warning: Invalid argument supplied for foreach() in /Users/…/kirby/core/pages.php on line 20

I’m at a loss as to why this is happening. Any thoughts? Need more info?

It’s not pages() but page():


PS: It is generally recommended to use only lowercase names to make sure that your site works on case-sensitive file systems (like on Linux). Otherwise you will often get into a situation where the page can’t be found and the reason was that the capitalization was different.

You probably mean:

1 Like