private static function loopQueryPosts($loop)
    {
        $posts = [];
        for ($index = 0; $loop->have_posts(); $index++) {
            $loop->the_post();
            $posts[] = Post::find(get_the_ID());
        }
        return $posts;
    }
private static function loopQueryPosts($loop)
    {
        $posts = [];
        for ($index = 0; $loop->have_posts(); $index++) {
            $loop->the_post();
            $posts[] = Post::find(get_the_ID());
        }
        return $posts;
    }
private static function loopQueryPosts ( $ loop ) { $ posts = [ ] ; for ( $ index = 0 ; $ loop -> have_posts ( ) ; $ index ++ ) { $ loop -> the_post ( ) ; $ posts [ ] = Post :: find ( get_the_ID ( ) ) ; } return $ posts ; }
Loop the query and mount the Post objects

@param WP_Query $loop
@return array<Post>
Loop the query and mount the Post objects