Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/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 );
This page is marked as incomplete. You can help Codex by expanding it.