-
-
Save billerickson/9c6d9cafd18c093d7961cd350ef2c399 to your computer and use it in GitHub Desktop.
This file contains 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 // don't include this | |
/** | |
* Alphabetically sort subpages | |
* | |
* @link http://www.billerickson.net/code/subpages-widget-alphabetical-order/ | |
* @author Bill Erickson | |
* | |
* @param array $args, query arguments | |
* @return array $args | |
*/ | |
function ea_alphabetically_sort_subpages( $args ) { | |
$args['sort_column'] = 'post_title'; | |
$args['sort_order'] = 'ASC'; | |
return $args; | |
} | |
add_filter( 'be_subpages_widget_args', 'ea_alphabetically_sort_subpages' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment