How to modify the text displayed when there are no entries.

GravityView Defaults

By default, GravityView shows two values, depending on the situation.

If the View is displaying a search result, the default text is:

This search returned no results.

Otherwise, if no search has been performed, the default text is:

No entries match your request.

Change the text

To modify this, GravityView provides the gravitview_no_entries_text filter.

The gravitview_no_entries_text filter

Modify the text displayed when there are no entries.

Has two arguments:

  • string $output - The existing "No Entries" text
  • boolean $is_search - Is the current page a search result, or just a multiple entries screen?

To modify the text, add this sample code (also available here)