Created
August 15, 2017 19:28
-
-
Save brycejacobson/1fe63da39ef05afe3490932f1a48b68c to your computer and use it in GitHub Desktop.
Exclude page from BE Subpages Widget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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