Undefined property: WP_Query::$post
First of all post field of WP_Query is current post ID and not post object. But I don’t think you should use it before calling the_post() method. Normally you should do it in this way: $args = … $hometeams = new WP_Query( $args ); $teamishome = $hometeams->have_posts(); while ( $hometeams->have_posts() ) { $hometeams->the_post(); $scorehome = … Read more