7

How can I set a manual filter on Google Custom Search Engine (not from CSE panel)?

For example, to open the link in a new tab I'm using this code:

<gcse:searchresults-only linktarget="_blank"></gcse:searchresults-only>

Now I want to set the "safe mode", and also set the results per page (to show 10 results, for instance).

To be clearer, I want to allow users to change those filters from my website, that's is why I'm trying to add them manually! Thanks.

Mariana
  • 145
  • 1
  • 9
Leo
  • 288
  • 4
  • 25
  • could you add the code you have tried so far? – Yvonne Aburrow Jan 11 '19 at 19:54
  • Assuming the `SafeSearch="off"` attribute is appended to the above element, what are the conditions that the toggle should be based on to change between the values `on` and `off`? – AndrewL64 Jan 11 '19 at 22:33
  • 1
    active & off is and moderate i think, but i want just `active` and `off`, checkbox checked set `SafeSearch="active"` checkbox unchecked `SafeSearch="off"` https://developers.google.com/custom-search/docs/element – Leo Jan 11 '19 at 22:35
  • Use both `webSearchSafesearch` and `SafeSearch` to be `"active"` or `off` where you can change both. – I_Al-thamary Jan 16 '19 at 16:16

0 Answers0