• Resolved MD

    (@marcussdixler)


    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=&#8217; + 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebshopLogic

    (@webshoplogic)

    Hi,

    You have two possibilities.

    You can apply short code or widget for insert Google Search box into your site. This will add a new search box, and the existing one in your theme should be removed, it is supported by the theme.
    It is possible if the theme supports using shortcodes or widgets on that place where you would like to insert the search box.

    This way the look and feel of the search box may be changed, because you have a new search box and the existing is hidden.

    The second solution is applying custom development for integrating the search box and the specific theme tightly, but this is a more serious task.
    E.g. we have changed the search box of GeneratePress theme on webshoplogic.com, it takes 1-2 days development. You can see the result on webshoplogic.com, it is a very tight integration, that can be achieved with custom development.

    You may consider hiring a developer for this job.
    He may use the following code to insert search box in his code:
    <?php echo do_shortcode('[wp_google_searchbox]'); ?>

    Peter Rath,
    WebshopLogic

    Plugin Author WebshopLogic

    (@webshoplogic)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Divi Theme Replace Search’ is closed to new replies.