Using WP_Query in “parse_query” or “pre_get_post” in Posts2Posts
You are invoking an infinite loop, because you are calling WP_Query inside WP_Query, which is where the hook resides, so you are hooking it into parse_query over and over again. To avoid it, put the following at the beginning of your callback function: // avoid infinite loop remove_action( ‘parse_query’, __FUNCTION__ ); Additional note, it might … Read more