Calling the_post()
operates on the global $wp_query
, for your custom query you need to call the method of the query object: $loop->the_post()
.
Calling the_post()
operates on the global $wp_query
, for your custom query you need to call the method of the query object: $loop->the_post()
.