---
title: "Enable Views to be hierarchical (parent/child)"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/advanced/enable-views-to-be-hierarchical-parent-child/"
---

If you want to define a View as a parent to another View, you should add the following code to your functions.php file:

```

add_filter( 'gravityview_is_hierarchical', '__return_true' );
```

```

add_filter( 'gravityview_is_hierarchical', '__return_true' );
```

Read here how to add these code samples to your website: [Where to put code samples.](https://www.gravitykit.com/docs/gravityview/customizing-your-views/where-to-put-code-samples/)

There will be no functionality changes to GravityView by enabling this configuration.

### If you experience 404 errors after adding this code:

You need to re-save "permalinks" on your site by:

- Going to your Dashboard
- Clicking on the Settings menu item in the sidebar
- Clicking on "Permalinks"
- Clicking the "Save Changes" button to save the form

That should fix the 404s.