Hello. I have a website folder structure like this.
-- PROJECTS -- POST
-- POST -- SUBPOST
-- SUBPOST
-- POST
-- SHOP
I try to find a way to load POST & SUBPOST, on the SHOP page
So far in my SHOP page, I can get SUBPOST like this :
<?php if ($projetPage = page('projets')->children()): ?>
<?php foreach ($projetPage->children()->listed() as $projet): ?>
...
<?php endforeach ?>
<?php endif ?>
or I can get POST like this :
<?php if ($projetPage = page('projets')): ?>
<?php foreach ($projetPage->children()->listed() as $projet): ?>
...
<?php endforeach ?>
<?php endif ?>
Both are working, but I would like to combine those two, and get POST and SUBPOST on the SHOP page. How could I accomplish that ? Can I have one var $projetPage that get those two type of post ?
Thanks for your help.