# isParentOf() inside feed

**URL:** <https://forum.getkirby.com/t/isparentof-inside-feed/10004>\
**Category:** Questions\
**Tags:** v2\
**Created:** [March 17, 2018, 10:41am UTC](https://forum.getkirby.com/t/isparentof-inside-feed/10004 "2018-03-17T10:41:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oziris](https://avatars.discourse-cdn.com/v4/letter/o/df788c/32.png) [@Oziris](https://forum.getkirby.com/u/Oziris)\
**Post date:** [March 17, 2018, 10:41am UTC](https://forum.getkirby.com/t/isparentof-inside-feed/10004/1 "2018-03-17T10:41:10Z")

</div>

Hello  
I’ve set a feed template displaying two different pages with

```
<?php
    $posts_a = page('actualites')->children()->visible();
    $posts_b = page('catalogue')->children()->visible();
    $posts = new Pages(array($posts_a, $posts_b));
 
    echo $posts->sortBy('date', 'desc')->feed(array(
        'title' => $site->title(),
        'description' => $site->description(),
        'link' => 'feed',
    ));
?>

```

But these pages have different content, I would like to check “if” before including them into the feed. I use the `isParentOf()` in the `template.php` file of the feed plugin, but this doesn’t work.

```
<?php if($item->isParentOf('catalogue')): ?>
   <?php echo $site->text()->html() ?>
<?php endif ?>

```

This doesn’t return anything…

---

<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:** [March 17, 2018, 11:04am UTC](https://forum.getkirby.com/t/isparentof-inside-feed/10004/2 "2018-03-17T11:04:49Z")

</div>

I guess you want to check if the item is a child of the catalogue page, not the parent =\> `isChildOf()`

---

<div class="post-metadata">

**Author:** ![Oziris](https://avatars.discourse-cdn.com/v4/letter/o/df788c/32.png) [@Oziris](https://forum.getkirby.com/u/Oziris)\
**Post date:** [March 17, 2018, 11:07am UTC](https://forum.getkirby.com/t/isparentof-inside-feed/10004/3 "2018-03-17T11:07:06Z")

</div>

arg, sorry, I always confuse both…Thanks !

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:28pm UTC](https://forum.getkirby.com/t/isparentof-inside-feed/10004/4 "2025-02-06T17:28:38Z")

</div>


