Archived topic
Search results missing products
9 replies · Started by Peter on April 12, 2021
Hi
I'm having an issue with the search results with products.
For example we have a download and printed version of the same product but they are listed as 2 separate products.
If I search for the word 'trio' the search will return only one of these products in some cases.
Both products have exactly the same description but only the printed version will return in some cases.
I have tried several external search plugins, rebuilt the database and the below code which completely clears the search altogether and gives a blank page.
I need the search to be able to return a search of all the products with the search description, any ideas???
The web address is https://www.bartholomewmusic.co.uk/
The search example is using the word 'trio'
Cheers
Peter
I've tried adding this code
add_filter( 'generate_navigation_search_output', function() {
printf(
'<form method="get" class="search-form navigation-search" action="%1$s">
<input type="search" class="search-field" value="%2$s" name="s" title="%3$s" />
<input type="hidden" name="post_type" value="product" />
</form>',
esc_url( home_url( '/' ) ),
esc_attr( get_search_query() ),
esc_attr_x( 'Search', 'label', 'generatepress' )
);
} );
Hi Peter,
When I search for "trio" using the navigation search, this is the result I see:
https://www.screencast.com/t/AsEBN3Mk
Just want to confirm that's incorrect?
If so, can you add a WordPress search widget, let's say in the off-canvas widget area, and test if the same issue occurs?
Hi Leo
Thanks for getting back to me.
Yes that search is incorrect.
I've placed a search in the off canvas area and the results are the same.
In the screen grab, 'March of The Lemmings' and 'Dance' should show the download versions (identified by a small download icon like 'The More The Merrier').
Any ideas?
Cheers
Peter
Hi there,
which plugins have you tried ? Are they Woocommerce specific plugins ?
As the default WP Search function is not very good.....
Hi David
I've tried
Ivory Search
Relevanssi
ACF: Better search
Advanced Woo Search (this did return the correct results but the design of the results from a dropdown didn't work and if I hit return they'd all dissappear).
That's all that I've tried so far.
Cheers
Peter
In the Advanced Woo Search plugin there is an option in its settings on the Search Form tab to use just the Search Results page - that plugin is one we see being used a lot by people.
Thanks David
I've tried AWS again but it just returns a blank page - nada!
Can you remove the PHP Snippet for changing the nav search and any other search plugins ( if installed )
Hi David
I removed the snippet and then removed all the snippets and it still returned a blank page. AWS was the only search plugin that was installed.
We're going to call it a day as the site is now live.
If customers complain then we'll need to look at it again but we've spent too long on this now and nowhere nearer to a solution.
Thanks for yours and Leo's time.
Peter
That is very odd - i have used the plugin in the past with 'reasonably' good results - they all have their foibles but never did i lose the search results page.
Sorry we couldn't be of much greater help.
Let us know if you need a hand in the future.