WordPress filter hook · part of WordPress core
wp_list_pages_excludes
A WordPress core filter that 16 plugins also fire themselves, running on 20K+ sites between them.
“Filters the array of pages to exclude from the pages list.”
How to use wp_list_pages_excludes
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wp_list_pages_excludes', function( $exclude_array ) {
// Change $exclude_array here.
return $exclude_array;
}, 10, 1 );Argument names come from EazyDocs's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
16 plugins that fire wp_list_pages_excludes
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Advanced Sidebar Menu10,000+ installs
apply_filters( 'wp_list_pages_excludes', wp_parse_id_list( $args['exclude'] ) )src/List_Pages.php:242 -
Adminify6,000+ installs
apply_filters( 'wp_list_pages_excludes', [] )Inc/Modules/PostTypesOrder/PostTypesOrder.php:95 -
EazyDocs2,000+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )includes/functions.php:816 -
WPComplete1,000+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )public/class-wpcomplete-public.php:1707 -
List Last Changes1,000+ installs
apply_filters( 'wp_list_pages_excludes', explode(',', $r['exclude']) )list-last-changes.php:225 -
Sitemap with woocommerce100+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )index.php:211 -
GNA Post Order100+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )admin/gna-post-order-admin-sortpage-menu.php:187 -
Documentation100+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )lib/views/class-documentation-renderer.php:465 -
Custom Page Menus60+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )template-tag.php:30 -
All Round Order30+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )1.1/all-round-order.php:226 -
Child pages as boxes with title,content and image20+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )childpages.php:50 -
JS Widgets10+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )core-adapter-widgets/pages/class.php:160 -
WP YUI Menu10+ installs
apply_filters( 'wp_list_pages_excludes', explode(',', $r['exclude']) )wp-yui-menu.php:54 -
Easy Post Re-Order10+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )files/easysoftonic-my-easy-class.php:375 -
Tagged Sitemap10+ installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )functions.php:24 -
MindValley Show Last EditedFewer than 10 installs
apply_filters( 'wp_list_pages_excludes', $exclude_array )mindvalley-last-edited-post.php:139
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.