Also, referencing $_GET didn’t work. Had to do this:
global $wp_query;
if ( $wp_query->query_vars['detail'] ) { ...
The above (first bit of functions, more specifically) wouldn’t work without another function to open up a qvar:
function detail_queryvars( $qvars ) {
$qvars[] = 'detail';
return $qvars;
}
add_filter('query_vars', 'detail_queryvars' );
Maybe this was a version difference or maybe ‘detail’ was already opened up. Extremely frustrating to figure out. Hope this saves you some brain cells!