Filters query arguments passed to WP_Query in get_pages.
$query_argsarray
$parsed_argsarray
child_of int$hierarchical has no bearing on whether $child_of returns hierarchical results. Default 0, or no restriction.sort_order string'ASC', 'DESC'. Default 'ASC'.sort_column string'post_author', 'post_date', 'post_title', 'post_name', 'post_modified', 'menu_order', 'post_modified_gmt', 'post_parent', 'ID', 'rand', 'comment*count'.'post*' can be omitted for any values that start with it.'post_title'.hierarchical bool$child_of also being false, both arguments will be disregarded.exclude int[]include int[]$child_of, $parent, $exclude, $meta_key, $meta_value, or $hierarchical.meta_key stringmeta_value string$meta_key.authors stringparent intexclude_tree string|int[]number intoffset int$number.post_type string'page'.post_status string|array'publish'.$query_args = apply_filters( 'get_pages_query_args', $query_args, $parsed_args );
| Version | Description |
|---|---|
| 6.3.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_pages_query_args