Where is the place to assign Widgets to certain pages

Hello wonderful people.
I have an existing widget (“product search”). But it appears only on certain pages. I like it to appear on all my Woocommerce pages.
I read through your documents. I don’t seem to locate the place where I can assign the widget and enable the “product search” on the relevant pages.
Could you kindly point me in the right direction?

Hey @iamwithU,

The product search widget was added to the default footer widget.

The reason why it is showing on your checkout page is that the checkout page is not built using the footer builder and the footer of your WooCommerce page was built using the footer builder. That being said, to add the product search widget on your WooCommerce page, you need to add the widget in your footer builder.

Hope that helps.

Thank you @marc_a, for your prompt response.

I had set up the product search widget some 6 years ago. I tried reading up your docs:


And I found the solution in a thread:

But I had to go to Cornerstone first to grant permissions to add Widget Area.
Phew! I got the widget set up now. However, when I keyed in a search term, the results don’t appear as previously. In the past, the products related to the search term will appear. But now, after each search is made, the page will just refresh and go to the Shop page instead. Is there a step I am missing?

Look forward to your diagnosis.

Hi @iamwithU,

I have checked your Search Result page and found that you might have assigned a custom Archive Layout to the Archive pages with the Content area to be shown. You need to create a new Layout and assign it to the Search Result as shown in the given screenshot.

Hope it helps.
Thanks

Thank you @tristup for your prompt reply.

I tried creating a new Layout as you suggested. Alas, I couldn’t add any element. I could add a template. More importantly, when I keyed in a search term, no search results appear. In the past, the search results would appear with images and product names.

By the way, where did you go to locate my “Search Result” page? I couldn’t find it too. I would like to use the layout in there. Appreciate your pointing the way.

By any chance, is it possible to have the search results appear as a pop up modal? If so, would you be so kind to let me know in gist the steps for doing so. I think it will be good for user experience, instead of jumping to another page. Thanks.

Hello @iamwithU,

Please go to Cornerstone > Layout Builder and find the custom Search Result layout.

When you edit the layout, you can assign the Search Results and add a keyword in the field.

WordPress has a dedicated search results field. If you want the search results to be displayed in a popup modal, it may be possible with custom development already which is outside the scope of our support.

Best Regards.

Thank you @ruenel for your kind response.
I don’t quite understand what is the purpose of your 2nd picture. After entering some keywords, all I got was empty boxes on the canvas…:


Would you care to elaborate so I can apply as you suggested: “assign the Search Results and add a keyword in the field”?

Allow me to clarify my current question: if a visitor uses my “product search” and keys in a search term, eg “chicken”, “flour-less”, the website will then show a page of products related to these search terms. Right now, it goes to a new search result page, with no products appearing. I was able to do that in the past - the relevant products would appear. (I have 15 products with the tag, “flour-less”)

That was why I asked @tristup where he saw my old “result page”. I am hoping to continue using that layout or format.

Any clue what is preventing my new result page from displaying the respective results or products? It only produces search result if exact name of the product is keyed in. it doesn’t produce search result for relevant tags or words that are part of the product name.

Hello @iamwithU,

Please check out this video:

This will show you how you can create a custom layout for Search Results page and show you how you can preview the search results page as well.

I am not sure why he is seeing it. The last time I check, your Search Results page is displaying blank because your custom layout assign to that page is empty at the moment.

Best Regards.

Awesome @ruenel! I learnt how to add dynamic content from your video. Thanks for your effort to produce that instructive recording :+1:

Even though you only had one column for the “consumer looper”, the search results appear in 3 columns. This is a screenshot from your video:

Amazing!
When I tried setting up 3 columns, the search results duplicate themselves in the other 2 columns, ie the 2nd and 3rd columns are exactly the same as the 1st column - the same product appears 3 times.

After a few hours, I managed to get something rough going. However, the products cannot be clicked. Whereas in the past, when the search results appeared, a visitor can just click on that product, and the page will jump to the individual product page.

Also, how do I make the search term appears on top of the page. Eg, if the term was “flour-less”, can we display the term “flour-less” on top of the page?

Lastly, how do we get the results to show all those products that were tagged “flour-less” to appear? Instead of 15 items, now only 5 products appear because that is in the product name.

Hello @iamwithU,

The 1 column that I have is a Looper Consumer. It consumes any results from the search result loop. I have checked your custom Search Results layout and you are on the right track.

If you want the products to be clicked and linked to the individual single product page, you will have to enable the Link URL feature of the Column by setting the HTML Tag of the column to use <a>;

or insert a button inside the column and use {{dc:post:permalink}} as the link URL.

To display the Search Query, use the {{dc:query:search_query}} dynamic content:

The number of items in the search results will display up to 10 items or whatever number has been set in Settings > Reading > Blog pages show at most.

Best Regards.

Splendid @ruenel. Thanks for staying with me on this. I got the Search Query set up.
Hmm, I tried both your methods but clicking the button nor the photo / title will not bring the customer to the individual product page.

Beside {{dc:post:permalink}}, I also tried {{dc:page:permalink}} or {{dc:product:permalink}}. The links are not activated… :frowning:

Also how do I center the button, and the title (product name)?

Lastly, the search results are not displaying products that are tagged, eg “flour-less”. They only show them if the word “flour-less” is in the title of the product. You will see a sample here:

You will see that I have tagged several products as “flour-less”. eg:

These tagged products should appear in the search result too. Previously, they showed up. Any clue why products with those tags are not appearing?

Hi @iamwithU,

I have checked and found that the Row has been set to the a tag from Row > Setup > HTML Tag. I have changed it to the Div tag and now the permalinks are working.

Thanks

Thank you @tristup for your kind help!
May I know where I can read up to know more about the different html tags and their meanings, eg what does the “a” tag mean?

As mentioned earlier, I have tagged several products, “flour-less”, but they are not appearing in the search results. Any clue why the search is not producing results that carry those tags?

Hello @iamwithU,

In order to get more information about HTML I would suggest you please have a look at this tutorial

I have checked the product search it seems that it is working fine on my end. It might be the issue with the browser cache I would suggest you please clear your browser cache and then check it again. Please have a look at the given screenshot below.

Thanks

Thank you @prakash_s for your prompt response.
Right now, the search will produce results if the key word (or search term) appears in the product name itself. If you see my previous post showing example of tagged items, “garlic flakes”, “vegetable floss” in the screenshot, these items do not appear when a search is done.

You will know what I mean when you key in this word to search: “flour-less”. There should be 15 items, but as my previous screenshot above shows, only 5 items appear:

The other 10 items do not have the word “flour-less” in them, but carry the tag “flour-less”.
Look forward to your kind help.

Hello @iamwithU,

Please be advised that the WordPress Search function will get the keyword from the title and the content or description. It will not include the tags.

Please compare the results from the following links I have added in the secure note below.

I can confirm that there are mostly 15 items tagged as “flour-less” but since WordPress will look for the keyword in the title or content (description), it only returns 5 items.

Hope this makes sense.

Brilliant @ruenel. I’ll add the word to my description from now on! Thanks so much for providing value-add solutions each time!