Hi, I'm trying to understand Google's instruction on how to make my Google CSE to display only Google Safesearch results. I'm willing to pay $5 for the first person to review this page and tell me what to plug into my Google CSE code. Just post your advice and if it works, I will pay you the $5. This is the document and my code is below: Tell me exactly where to plug the recommended code into. Thanks https://developers.google.com/custom-search/docs/element <script> (function() { var cx = '00440449146423xxxxxx:wo1qgu___ha'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> <gcse:search></gcse:search>
I'm guessing you would need to include the attribute "webSearchSafesearch". So where you have this line of code at the bottom "<gcse:search></gcse:search>" Try changing it to <gcse:search webSearchSafesearch="active"></gcse:search> I haven't used the product before so I wouldn't be able to tell you otherwise. But from reading that doc you would just include that attribute. Jamie