wp_list_pages_excludes
Filters the array of pages to exclude from the pages list.
Usage
add_filter( 'wp_list_pages_excludes', 'wp_kama_list_pages_excludes_filter' ); /** * Function for `wp_list_pages_excludes` filter-hook. * * @param string[] $exclude_array An array of page IDs to exclude. * * @return string[] */ function wp_kama_list_pages_excludes_filter( $exclude_array ){ // filter... return $exclude_array; }
- $exclude_array(string[])
- An array of page IDs to exclude.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
wp_list_pages_excludes
wp-includes/post-template.php 1333
$parsed_args['exclude'] = implode( ',', apply_filters( 'wp_list_pages_excludes', $exclude_array ) );