Skip to content

Instantly share code, notes, and snippets.

@rafaehlers
Last active July 12, 2019 17:44
Show Gist options
  • Save rafaehlers/08e9ac364ecb0a31591300263414e76f to your computer and use it in GitHub Desktop.
Save rafaehlers/08e9ac364ecb0a31591300263414e76f to your computer and use it in GitHub Desktop.
<?php //don't copy this line
add_filter( 'gravityview/template/text/no_entries', 'modify_gravityview_no_entries_text', 10, 3 );
function modify_gravityview_no_entries_text( $existing_text, $is_search = false, $context = null ) {
$return = $existing_text;
$view_id = $context->view->ID;
if( $view_id == 3683 ) { // CHANGE TO THE VIEW ID YOU WANT TO TARGET
$return = 'View empty';
}
return $return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment