add_action('elementor/query/child_posts_query',function($query){// Ensure we're on a single post page
    if ( is_singular() ) {
        // Get the ID of the current post (parent post)
        $parent_post_id = get_the_ID();

        // Set the query to fetch posts with the current post as their parent
        $query->set( 'post_parent', $parent_post_id );

        // Specify the custom post type if needed
        $query->set( 'post_type', 'services' ); // Replace 'your_custom_post_type' with your actual post type

        // Optional settings for order and number of posts
        $query->set( 'orderby', 'date' ); // Orders by date
        $query->set( 'order', 'DESC' ); // Orders in descending order
        $query->set( 'posts_per_page',-1);// -1 to retrieve all child posts}});