Hi all - Probably a silly question, but I’m having trouble fetching children from a page of a particular name.
Using the following code:
<?php $sectorItems = page('inspiration')->children()->listed();
foreach ($sectorItems as $sectorItem) : ?>
I can only get this to work when the page I am calling is a direct descendent of the page I’m on. So I’m guessing that I need to change me method by doing a deeper search of the site, but I’ve tried several things that haven’t worked. Am I right in thinking this is the issue?
This code is used on my home page, and in the example above the ‘inspiration’ page is 3 levels deep (so i guess a grandGrandChild!)