Archived topic
Ajax Search Bar question
5 replies · Started by Ethan on May 23, 2020
Hi everyone. First of all sorry if this is the wrong thread, this is my first post. I am setting up my first ever affiliate website with WordPress. I am using the GeneratePress theme.
I have a very annoying problem with the ajax search bar. I disabled single product pages because I want users to click on the product listings and go to amazon to (hopefully) purchase. But if I write something into the search bar and click on the result then it takes me to the single product page. How can I disable this feature?
I want something like this site: http://www.thisiswhyimbroke.com if you search for something it just returns product listings related to that search query.
I hope someone can help.
Thanks guys.
Hi there,
GP itself doesn't have AJax search bar built-in.
Are you using a plugin?
Hi Leo, I just checked it again, you're right it's a woocommerce plugin:
[img]https://i.imgur.com/0PXK953.png[/img]
I want to include search functionality but I don't want that behavior. Is there a way to accomplish this without using this ajax search bar?
Unfortunately I'm not sure if that's do-able - even if it is, it will require some custom coding to modify the search query:
https://developer.wordpress.org/reference/functions/the_search_query/
I see :( thanks Leo.
No problem :)