Advertisement:

Author Topic: Want to implement google custom search on page which shows There are no results  (Read 49 times)

moinuddin

  • Full Member
  • ***
  • Posts: 102
Hi,

I want to implement google custom search on page which shows - There are no results matching..

This is a possibility if a user enters a wrong spelling ..hence i want him to try again in google custom search box if he don't get result with Osclass  search ..i know about how to generate google codes ..the only thing i want to know is that where to put the codes to show on that page which gives no result.

And on the other hand ..is there any spell correction codes which suggest the correct spelling after user enter wrong spelling in search box.(just like google - did you mean).

Thanks in advance .


WEBmods

  • Hero Member
  • *****
  • Posts: 936
  • github.com/webmods-croatia/love-osclass/ | patrick
Hello!

For Bender find this in search.php and add your code after it.

Code: [Select]
<p class="empty" ><?php printf(__('There are no results matching "%s"''bender'), osc_search_pattern()) ; ?></p>

There is a paid (I believe) spell check API by Microsoft: https://azure.microsoft.com/en-in/services/cognitive-services/spell-check/

Regards.