This page redirects to an external site: https://developer.wordpress.org/reference/hooks/widget_pages_args/
I have used this function to remove certain pages from displaying in the WordPress default Display Pages widget.
// $secure_slug = '?????';
function wp_list_pages_filter($remove_args) { global $secure_slug;
$remove_secure = array($secure_slug);// or could be array(1,2,3,4)
$remove_args['exclude'] = implode( ',', $remove_secure);
return $remove_args;
}
add_filter( 'widget_pages_args', 'wp_list_pages_filter', 10, 1 );