Home / Forums / WoodMart support forum / Search bar issues
Home › Forums › WoodMart support forum › Search bar issues
Search bar issues
- This topic has 7 replies, 2 voices, and was last updated 2 weeks, 4 days ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
November 10, 2025 at 4:27 pm #695187
tomassParticipantHello,
There is an issue with the product search, it doesnt show any results if i write an exact match with a product name. For example, if i write “Bel” it will show the one product Belt, but if i write exactly “Belt” it shows no results and if i press enter it takes to the product page.
November 11, 2025 at 12:44 pm #695357
Aizaz Imtiaz AwanKeymasterHello,
I have checked your site and noticed that you have 5 products with the exact same details: same title, description, price, category, and SKU (woo-belt). The only difference between them is the product ID.
This is why the search is not returning results correctly for an exact match — WooCommerce search can get confused when multiple products have identical information.
To resolve this, you should ensure that each product has unique titles and information. Once the products are unique, the search functionality will work as expected.
Best Regards,
November 11, 2025 at 5:06 pm #695446
tomassParticipantIt still doesnt show the results for an exact match, i checked so there are no duplicate products. Skus for the same product in different language should be the same so i cant change that.
November 12, 2025 at 11:07 am #695588
Aizaz Imtiaz AwanKeymasterHello,
The search functionality is handled by WooCommerce. Could you please check how it works with some default WordPress themes like WooCommerce Storefront to understand if it is our theme issue or not?
Best Regards,
November 14, 2025 at 2:38 pm #696045
tomassParticipantHey,
I tried with the woocommerce store front but it doesnt have the ajax search results that show up, it only searches when i hit enter. So i believe this is woodmart issue, because i dont have any plugins for search.
November 15, 2025 at 8:06 am #696122
Aizaz Imtiaz AwanKeymasterHello,
When there are multiple products with the exact same title, WooCommerce treats the exact-match search as a direct product lookup.
So typing “Belt” and pressing Enter triggers WooCommerce’s built-in behavior:
- If the search term is an exact product title
- And multiple products share the same title
- WooCommerce redirects directly to one of those product pages (usually the first one in the database)
This is the same behavior you saw in Storefront — pressing Enter also loads one of the products directly, not a product archive.
Woodmart adds AJAX suggestions, but the final search redirect is still controlled by WooCommerce.
So the underlying redirect behavior is the same.
To verify this behavior fully:
1. Rename one product to “Belt – Blue” or “Belt v2”
2. Search “Belt” again
3. You will see the normal results page instead of being redirected.Hope you can understand!
Best Regards,
November 17, 2025 at 6:22 pm #696441
tomassParticipantHello,
Yeah i understand that if there are multiple products and you hit enter it takes you to the product archive, but if i search the exact match, it doesnt appear in the ajax suggestions. It would be fine if it apeared and it would redirect, but right now the client would search the product and he would think that the product isnt there, because it doesnt appear in the search suggestions.
I deleted the duplicate products, i translated the belt product for both languages, and it still works the same, i search belt and it doesn’t show the suggestions.
Maybe i wasnt clear enough at the start, i want the exact match single suggestion to show. I have seen this in multiple projects now, its a bit annoying.
November 18, 2025 at 9:47 am #696507
Aizaz Imtiaz AwanKeymasterHello,
When the search term is exactly the same as the product title, WooCommerce treats it as a “direct match,” and the AJAX query sometimes returns 0 results, while the non-AJAX search still finds it.
Please try one quick test:
Rename the product from “Belt” to “Belt ” with a “Belt – A” temporarily.
You will immediately see the AJAX suggestion appear.
So the product is found correctly — the issue is only with the exact-match case.
If you want to change this behaviour, You need to edit the theme files for this. All the customizations made in the theme files are at your own risk.
inc/modules/search/class-ajax-search.phpBest Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register