Skip to content

Instantly share code, notes, and snippets.

@brycejacobson
Created August 15, 2017 19:28
Show Gist options
  • Save brycejacobson/1fe63da39ef05afe3490932f1a48b68c to your computer and use it in GitHub Desktop.
Save brycejacobson/1fe63da39ef05afe3490932f1a48b68c to your computer and use it in GitHub Desktop.
Exclude page from BE Subpages Widget
<?php
add_filter('be_subpages_widget_args', 'bgcmn_subpages_widget_args');
/**
* Exclude page from Subpages Widget.
*
* @param array $args Array of arguments.
* @param array Modified array of arguments for get_pages().
*/
function bgcmn_subpages_widget_args($args)
{
// Build a menu listing top level parent's children
$args['exclude'] = '295';
return $args;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment