Quote from Alex Dev on January 8, 2026, 13:43
Hello
Here it is simple CSS solution for this!
When HUSKY performs a search (non-AJAX redirect), it automatically adds the class woof_search_is_going to the <body> tag on the results page. You can use this to hide the search form container.
Solution: Hide search form on results page using CSS
The search form container has the class .woof_text_search_container - we just need to hide it when the search is active.
Method 1: Add CSS via functions.php (Recommended)
Add this code to your child theme's functions.php file:
add_action('wp_footer', function() {
?>
<style>
body.woof_search_is_going .woof_text_search_container {
display: none !important;
}
</style>
<?php
});
Or using wp_head hook if you prefer:
add_action('wp_head', function() {
?>
<style>
body.woof_search_is_going .woof_text_search_container {
display: none !important;
}
</style>
<?php
});
Method 2: Add to your theme's style.css
If you have a child theme with style.css, you can add this CSS directly:
body.woof_search_is_going .woof_text_search_container {
display: none !important;
}
How it works:
- User enters search on your main page → form is visible (no special body class yet)
- User submits search → page redirects to results
- On results page,
<body> has class woof_search_is_going - CSS rule kicks in and hides
.woof_text_search_container - User clicks browser back button → returns to original page without the body class → form appears again
Important notes:
- Make sure you're using a child theme if adding to functions.php - otherwise updates will overwrite your changes
- The
!important flag ensures this CSS takes priority over other styles - This works for non-AJAX searches (with page reload/redirect)
Hello
Here it is simple CSS solution for this!
When HUSKY performs a search (non-AJAX redirect), it automatically adds the class woof_search_is_going to the <body> tag on the results page. You can use this to hide the search form container.
Solution: Hide search form on results page using CSS
The search form container has the class .woof_text_search_container - we just need to hide it when the search is active.
Method 1: Add CSS via functions.php (Recommended)
Add this code to your child theme's functions.php file:
add_action('wp_footer', function() {
?>
<style>
body.woof_search_is_going .woof_text_search_container {
display: none !important;
}
</style>
<?php
});
Or using wp_head hook if you prefer:
add_action('wp_head', function() {
?>
<style>
body.woof_search_is_going .woof_text_search_container {
display: none !important;
}
</style>
<?php
});
Method 2: Add to your theme's style.css
If you have a child theme with style.css, you can add this CSS directly:
body.woof_search_is_going .woof_text_search_container {
display: none !important;
}
How it works:
- User enters search on your main page → form is visible (no special body class yet)
- User submits search → page redirects to results
- On results page,
<body> has class woof_search_is_going - CSS rule kicks in and hides
.woof_text_search_container - User clicks browser back button → returns to original page without the body class → form appears again
Important notes:
- Make sure you're using a child theme if adding to functions.php - otherwise updates will overwrite your changes
- The
!important flag ensures this CSS takes priority over other styles - This works for non-AJAX searches (with page reload/redirect)