Divi Theme Replace Search
-
With your plugin I successfully replaced the default wordpress search. I’m unable to replace the default search for the Divi theme on the same site.
We have this code (X’s in place of our actual custom gcse code) in our Child theme “Divi Child” file searchform.php :
<script>
(function() {
var cx = ‘XXXXXXXXXXXXXXXXXX:xxxxxxxxx’;
var gcse = document.createElement(‘script’);
gcse.type = ‘text/javascript’;
gcse.async = true;
gcse.src = ‘https://cse.google.com/cse.js?cx=’ + cx;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(gcse, s);$(‘input.gsc-input’).attr(‘placeholder’, ‘custom text here’);
})();
</script>
<gcse:searchresults-only></gcse:searchresults-only>Divi support told us this:
“I don’t know much about the functionality because that is the area of the plugin you’re using and I don’t know how the plugin actually works or how it was coded.. I can help you implement the requirements of the plugin though (as per their documentation) so you better check the problem with them since they know how their code should work.”
Can you help with this?
Thanks,
MD
- The topic ‘Divi Theme Replace Search’ is closed to new replies.