Skip Navigation

[Resolved] Custom search bar for woocommerce on home page

This support ticket is created 3 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by janeyC 3 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2186855

Hi Jamal,

Tell us what you are trying to do?

I have a Woocommerce site using Toolset custom fields for additional information.
I have created a new product archive page as well as a single product page.
Now I need to add a search bar on my static home page that will display the search results on a separate page. i.e not on the actual home page where the search bar is located.

Is there any documentation that you are following?

Yes I have looked at a number of the forum posts but I get confused because they mention views and I am using blocks. Also my home page is built with Elementor.

Is there a similar example that we can see?

I am trying to achieve something like this - hidden link

What is the link to your site?

this is the page where I want to have the search bar - hidden link

#2187495

Hi,

Thank you for contacting us and I'd be happy to assist.

To achieve this, you can follow these steps:

1. First, you'll create a new page that will show the search results. Let's call it the "Search Results" page. Please make sure that this page is set to use the default block-based editor Gutenberg and not the Elementor.

2. On this "Search Results" page, you'll create a blocks-based view with a search form and the search results, as explained in this guide:
https://toolset.com/lesson-placement/lesson-placements-1621261-1622283/

3. Next, on your homepage that is built using the Elementor builder, you'll add the Toolset "Views" module and insert the newly created view from the last step, as an existing view. In the module's setting, please choose to only show the search form and not the results, also select the "Search Results" page to show the results on.

As a result, your website's visitors will see a search form on the homepage. But when the form will be used, they'll be redirected to the "Search Results" page for the results.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2191399

My issue is resolved now. Thank you!