Separate product search and blog search on same website
-
Hi,
I have a website with the Avada theme and I am trying to set up two different searches. On the product page and throughout the site, I need all of the searches to be for products, but on the Blog page I need the search bar there to return blog posts as the search results, so that it operates like a completely different search function.
I have partially succeeded, but need some help with the finer details. It’s all quite complex but I will try and explain.
I have a custom search results layout page in Avada with a search bar at the top, which is what my client has requested. The problem is, that the search bar on this page always returns results for products. Obviously when someone does a search from the Blog and sees posts, it would be better to have a search bar on the search results page that is geared up to searching the blog rather than throwing the user back into the middle of the shop when they are searching the blog, or a different search results page with a blog search bar instead, but I don’t think this is possible.
With the custom layout in Avada, I can set different search bars for Posts or Products and place them anywhere on the standard website pages, but I need the search results page to be correct too, and I think it’s only possible to have one custom search results page layout. I don’t want to use a dropdown select on the search bar to allow the user to choose between products and posts because it’s too cumbersome and confusing.
Currently, the custom search results page has two sections in it, because I needed one for posts and one for products so that both would display on the results page. This isn’t ideal either because all of the products show up twice in the results – once as Woocommerce products in a grid format, and once as standard posts underneath that. If I could stop the Woocommerce products displaying in the section that was set up for posts, that might be an option, if the search bar can be set up another way.
I think I previously had everything set up using a plugin called Better Search, but I can’t remember how I achieved this in the first place, and the search became really slow. Also, when I activate this plugin, it destroys the formatting of the pages and pagination, and displays a seemingly random number of products on each pagination page.
Any help with this would be fantastic because I’m not sure on the best way forwards and it’s very much starting to fry my brain!
Thanks.
The page I need help with: [log in to see the link]
- The topic ‘Separate product search and blog search on same website’ is closed to new replies.