# New Kirby Related Pages plugin

**URL:** <https://forum.getkirby.com/t/new-kirby-related-pages-plugin/6014>\
**Category:** Plugins\
**Created:** [December 9, 2016, 8:26pm UTC](https://forum.getkirby.com/t/new-kirby-related-pages-plugin/6014 "2016-12-09T20:26:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [December 10, 2016, 8:42am UTC](https://forum.getkirby.com/t/new-kirby-related-pages-plugin/6014/5 "2016-12-10T08:42:22Z")

</div>

Well, your use case is related, but that’s not what the plugin does. What you can do instead to filter the pages:

```auto
$filteredPages = page('projects')->children()->visible()->filter(function($p) {
  $structureField = $p->structurefield()->toStructure();
  foreach($structureField as $item) {
        if($item->occupation() == 'webdesign' && $item->department() == 'design') return $p;
      }
});

```

Instead of hardcoding the values, you would need to get them from an URL parameter.

---

_[View the full topic](https://forum.getkirby.com/t/new-kirby-related-pages-plugin/6014)._
