Skip to content

Added a filter to enable exclusion of children from admin post query

Compare
Choose a tag to compare
@aurovrata aurovrata released this 23 Mar 06:23
· 156 commits to master since this release

This was a request on the wordpress support by Anychanh.

Added a filter in the admin post query, so as to enable modification of the query args.

Example of filter use to exclude children of a given category,

add_filter('reorder_post_within_category_query_args', 'exclude_children');
function exclude_children($args) {
    $args['tax_query'][0]['include_children']=false;
    return $args;
}