Hi there. I have set up a custom Search Results page and everything is displaying correctly except for the actual results. It is displaying all posts not just those specific to the search term. Your help to fix this would be greatly appreciated. I will include my login details in a secure note.
Hi @rhinotago,
Thanks for reaching out.
It seems that the Search Query value is set to the Query String. The Query String should be s={{dc:query:search_query}}. I went ahead and added the s parameter and it started working properly.
Thanks
Brilliant. Thanks so much! Is there a way to limit search results to specific items, e.g. products only?
Hi Ryan,
You can update the query to post_type=product&s={{dc:query:search_query}} to only show a product posts.
Regarding that horizontal white line, that is the ROW’s default 1px padding, you can get rid of that by adding a class pvn to the Pagination row.
Hope it helps,
Cheers!
Thanks very much. The custom message that I have set up to appear when there are no search results now has issues. When I search a term of random characters, e.g. dfgmfdas, the custom message appears, but when I search ‘product’ it produces a blank section.
Hi @rhinotago,
The result was not found by the inner Looper Provider. When you are searching using the product it satisfied the Search Result provider which is automatically attached while you assigned the Layout to the Search Result.
But in the inner Query String where you used post_type=post&s=product does not have any result. So, you need to add another No result found within the Posts for the inner query which is producing no result in this case.
Hope it helps.
Thanks
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.


