infinite loop in wp_query using simple query
I’m not certain why it would cause an infinite loop, but make sure not to use $wp_query as the variable name for your custom query. It’s a reserved global variable for the main query. Use a different name for the variable. I’d also suggest using wp_reset_postdata() after the loop: $my_query = new WP_Query( $args ); … Read more