# Fetch list of UNLISTED pages without specific pages

**URL:** <https://forum.getkirby.com/t/fetch-list-of-unlisted-pages-without-specific-pages/14514>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 7, 2019, 4:43pm UTC](https://forum.getkirby.com/t/fetch-list-of-unlisted-pages-without-specific-pages/14514 "2019-06-07T16:43:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xpnimi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/xpnimi/32/748_2.png) [@xpnimi](https://forum.getkirby.com/u/xpnimi)\
**Post date:** [June 7, 2019, 4:43pm UTC](https://forum.getkirby.com/t/fetch-list-of-unlisted-pages-without-specific-pages/14514/1 "2019-06-07T16:43:15Z")

</div>

I want to get all **unlisted pages** to list them in the footer section, but this list shouldn’t include specific pages: such as `Home, Error`

I use this code:

```auto
<ul>
  <?php foreach($site->children()->unlisted() as $subpage): ?>
  <li>
    <a href="<?= $subpage->url() ?>">
      <?= html($subpage->title()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>

```

How can I exclude specific pages?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 7, 2019, 4:58pm UTC](https://forum.getkirby.com/t/fetch-list-of-unlisted-pages-without-specific-pages/14514/2 "2019-06-07T16:58:05Z")

</div>

The `not()` method is your friend:

```auto
<ul>
  <?php foreach($site->children()->unlisted()->not('error', 'home') as $subpage): ?>
  <li>
    <a href="<?= $subpage->url() ?>">
      <?= html($subpage->title()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>

```

---

<div class="post-metadata">

**Author:** ![xpnimi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/xpnimi/32/748_2.png) [@xpnimi](https://forum.getkirby.com/u/xpnimi)\
**Post date:** [June 7, 2019, 8:22pm UTC](https://forum.getkirby.com/t/fetch-list-of-unlisted-pages-without-specific-pages/14514/3 "2019-06-07T20:22:03Z")

</div>

thanks sonja.  
kirby is so nice and simple 😊👍. I just have to finde the answers myself.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 7, 2019, 8:38pm UTC](https://forum.getkirby.com/t/fetch-list-of-unlisted-pages-without-specific-pages/14514/4 "2019-06-07T20:38:33Z")

</div>

Yep, in the long run it pays off to get a decent overview of the API and its possibilities. You don’t have to know everything from the top of your head, but to have an idea where you might find an answer certainly helps.
