I've got this code to fetch all pages:
/** @var PageArray $pages */
$pages = $this
->wire('pages')
->find(sprintf(
'has_parent!=2,id!=2|7,status<%s',
Page::statusTrash
));
With this I fetch all pages except admin, but that includes the 404 page as well. Is there a way to exclude pages like the 404 page from the result? Or maybe loop through the result set to check for the pages response code (without curl that is)?
I want to avoid filtering the 404 page by ID if possible.