How can I hide children of draft pages using wp_list_pages()?

Great answers above. I took on the challenge trying to find yet another way to solve this. The exclude parameter: We could try: ‘exclude’ => wpse_exclude_drafts_branches() where: function wpse_exclude_drafts_branches() { global $wpdb; $exclude = array(); $results = $wpdb->get_col( “SELECT ID FROM {$wpdb->posts} where post_status=”draft” AND post_type=”page” ” ); $exclude = array_merge( $exclude, $results) ; while … Read more