diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/extras.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/extras.php
index ef39383a..2a75618a 100755
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/extras.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/extras.php
@@ -96,7 +96,7 @@ add_filter( 'document_title_parts', 'wporg_developer_document_title' );
  * @return string
  */
 function wporg_filter_archive_excerpt( $excerpt ) {
-	if ( ! is_single() && ! get_query_var( 'is_handbook' ) && 'command' !== get_query_var( 'post_type' ) ) {
+	if ( ! is_single() && ! $GLOBALS['wp_query']->is_handbook && 'command' !== get_query_var( 'post_type' ) ) {
 
 		$post_id = get_the_ID();
 		$type    = get_post_type_object( get_post_type( $post_id ) )->labels->singular_name;
@@ -194,4 +194,3 @@ function wporg_loop_pagination( $page_links ) {
 	return $page_links;
 }
 add_filter( 'loop_pagination', 'wporg_loop_pagination' );
-
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
index 1c2d355e..d20353ad 100644
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php
@@ -62,9 +62,8 @@ class Devhub_Handbooks {
 	 * @return array Array with public query vars.
 	 */
 	public static function add_query_vars( $public_query_vars ) {
-		$public_query_vars['is_handbook'] = false;
-		$public_query_vars['current_handbook'] = false;
-		$public_query_vars['current_handbook_home_url'] = false;
+		$public_query_vars['current_handbook'] = '';
+		$public_query_vars['current_handbook_home_url'] = '';
 		$public_query_vars['current_handbook_name'] = '';
 
 		return $public_query_vars;
@@ -77,12 +76,13 @@ class Devhub_Handbooks {
 	 */
 	public static function pre_get_posts( $query ) {
 		$is_handbook = function_exists( 'wporg_is_handbook' ) ? wporg_is_handbook() : false;
-		$query->set( 'is_handbook', $is_handbook );
+		$query->is_handbook = $is_handbook;
 
-		$current_handbook = function_exists( 'wporg_get_current_handbook' ) ? wporg_get_current_handbook() : false;
+		$current_handbook = function_exists( 'wporg_get_current_handbook' ) && wporg_get_current_handbook() ? wporg_get_current_handbook() : '';
 		$query->set( 'current_handbook', $current_handbook );
 
-		$current_handbook_home_url = function_exists( 'wporg_get_current_handbook_home_url' ) ? wporg_get_current_handbook_home_url() : false;
+		$current_handbook_home_url = function_exists( 'wporg_get_current_handbook_home_url' ) && wporg_get_current_handbook_home_url() ? wporg_get_current_handbook_home_url() :
+		'';
 		$query->set( 'current_handbook_home_url', $current_handbook_home_url );
 
 		$current_handbook_name = function_exists( 'wporg_get_current_handbook_name' ) ? wporg_get_current_handbook_name() : '';
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php
index b81b1406..8758df13 100644
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php
@@ -32,7 +32,7 @@ class DevHub_Redirects {
 	 * Redirects a search query with only one result directly to that result.
 	 */
 	public static function redirect_single_search_match() {
-		if ( is_search() && ! get_query_var( 'is_handbook' ) && 1 == $GLOBALS['wp_query']->found_posts ) {
+		if ( is_search() && ! $GLOBALS['wp_query']->is_handbook && 1 == $GLOBALS['wp_query']->found_posts ) {
 			wp_redirect( get_permalink( get_post() ) );
 			exit();
 		}
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
index 3fce6373..6dfff780 100644
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
@@ -24,22 +24,6 @@ class DevHub_Search {
 		add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ), 20 );
 		add_filter( 'posts_orderby', array( __CLASS__, 'search_posts_orderby' ), 10, 2 );
 		add_filter( 'the_posts',     array( __CLASS__, 'rerun_empty_exact_search' ), 10, 2 );
-		add_filter( 'query_vars',    array( __CLASS__, 'default_qv_empty_post_type_search' ) );
-	}
-
-	/**
-	 * Add query var to indicate if no post type filters were explicitly used for
-	 * a search.
-	 *
-	 * Defaults the query var 'empty_post_type_search' to false. It is potentially
-	 * set to true elsewhere.
-	 *
-	 * @param array $public_query_vars The array of whitelisted query variables.
-	 * @return array
-	 */
-	public static function default_qv_empty_post_type_search( $public_query_vars ) {
-		$public_query_vars['empty_post_type_search'] = false;
-		return $public_query_vars;
 	}
 
 	/**
@@ -59,7 +43,7 @@ class DevHub_Search {
 
 		// Separates searches for handbook pages from non-handbook pages depending on
 		// whether the search was performed within context of a handbook page or not.
-		if ( get_query_var( 'is_handbook' ) ) {
+		if ( $query->is_handbook ) {
 			// Search only in current handbook post type.
 			// Just to make sure. post type should already be set.
 			$query->set( 'post_type', wporg_get_current_handbook() );
@@ -82,7 +66,7 @@ class DevHub_Search {
 
 		if ( ! $qv_post_types ) {
 			// Record the fact no post types were explicitly supplied.
-			$query->set( 'empty_post_type_search', true );
+			$query->is_empty_post_type_search = true;
 
 			// Not a handbook page, or exact search, or filters used.
 			// Fallback to parsed post types.
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
index 7597ab55..b582475f 100755
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
@@ -1317,7 +1317,7 @@ namespace DevHub {
 		$post_types = get_parsed_post_types();
 		$taxonomies = array( 'wp-parser-since', 'wp-parser-package', 'wp-parser-source-file' );
 
-		return ! ( is_search() || is_404() ) && ( is_singular( $post_types ) || is_post_type_archive( $post_types ) || is_tax( $taxonomies ) || get_query_var( 'is_handbook' ) );
+		return ! ( is_search() || is_404() ) && ( is_singular( $post_types ) || is_post_type_archive( $post_types ) || is_tax( $taxonomies ) || $GLOBALS['wp_query']->is_handbook );
 	}
 
 	/**
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/search.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/search.php
index 0561c23c..24197b49 100755
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/search.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/search.php
@@ -13,7 +13,7 @@ get_header(); ?>
 			<span class="trail-browse"><span class="trail-begin"><?php _e( 'Search Results', 'wporg' ); ?></span></span><span class="sep">:</span>
 			<span><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Home', 'wporg' ); ?></a></span>
 			<span class="sep">/</span>
-			<?php if ( get_query_var( 'is_handbook' ) ) : ?>
+			<?php if ( $GLOBALS['wp_query']->is_handbook ) : ?>
 			<span><a href="<?php echo esc_url( get_query_var( 'current_handbook_home_url' ) ); ?>"><?php echo get_query_var( 'current_handbook_name' ); ?></a></span>
 			<?php elseif ( $reference_page = get_page_by_path( 'reference' ) ) : ?>
 			<span><a href="<?php echo esc_url( get_permalink( $reference_page ) ); ?>"><?php echo get_the_title( $reference_page ); ?></a></span>
@@ -31,7 +31,7 @@ get_header(); ?>
 			<?php /* Start the Loop */ ?>
 			<?php while ( have_posts() ) : the_post(); ?>
 
-				<?php get_template_part( 'content', get_query_var( 'is_handbook' ) ? 'handbook-archive' : 'reference-archive' ); ?>
+				<?php get_template_part( 'content', $GLOBALS['wp_query']->is_handbook ? 'handbook-archive' : 'reference-archive' ); ?>
 
 			<?php endwhile; ?>
 
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php
index 2f3ac5ec..32f9b009 100755
--- wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php
@@ -34,7 +34,7 @@
 <?php } ?>
 
 	<?php
-		$is_handbook = get_query_var( 'is_handbook' );
+		$is_handbook = $GLOBALS['wp_query']->is_handbook;
 		$search_url  = get_query_var( 'current_handbook_home_url' );
 		$search_url  = $search_url ? $search_url : home_url( '/' );
 		$filters     = ! ( $is_handbook || is_404() );
@@ -61,7 +61,7 @@
 				);
 				
 				$qv_post_type = array_filter( (array) get_query_var( 'post_type' ) );	
-				$no_filters   = get_query_var( 'empty_post_type_search' );
+				$no_filters   = $GLOBALS['wp_query']->is_empty_post_type_search;
 
 				if ( ! is_search() || in_array( 'any', $qv_post_type ) || $no_filters ) {
 					// No filters used.
