---
title: "Showing Before and After Content even when field is empty"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview-pro/diy-layout/showing-before-and-after-content-even-when-field-is-empty/"
---

If the value of a field is empty, the Before Content and After Content sections won't show up:

![Settings for displaying HTML before and after text field, supporting merge tags](https://www.gravitykit.com/wp-content/uploads/2025/10/file-i3gncll5FX.png)
*If you still need the contents of these two sections to appear regardless of the field's value, then you'll need to use this code snippet below:*
```
add_filter('gravityview-diy/field-value/show-settings-content-if-empty', '__return_true');
```

```
add_filter('gravityview-diy/field-value/show-settings-content-if-empty', '__return_true');
```

[How to add this code snippet to your website](https://www.gravitykit.com/docs/gravityview/customizing-your-views/where-to-put-code-samples/).