From 5da3044286785b4b3821074a9b0ea83ad94cd90c Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Fri, 1 Sep 2023 15:22:59 +0200 Subject: [PATCH] fix: Child post sorting --- modularity-graphql.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modularity-graphql.php b/modularity-graphql.php index a8f700b..e0de637 100644 --- a/modularity-graphql.php +++ b/modularity-graphql.php @@ -350,6 +350,10 @@ function ($type_registry) { $post_type ); $resolver->set_query_arg('post_parent', $parent_post->ID); + $resolver->set_query_arg('orderby', [ + 'menu_order' => 'ASC', + 'post_id' => 'ASC', + ]); break; case 'posttype': $post_type = get_field('posts_data_post_type', $root->ID, false);