• Resolved mustermann

    (@mustermann)


    Hi Frank,
    the script for “Google Custom Search” has changed and now no entries will display after search on the search result site.

    I think the problem is to exclude the script on the page for the search results in the customization from Plugin Autoptimize.

    I have the problem to find the name for the script to exclude it from script optimizing:

    <script>
    (function() {
    var cx = ‘partner-pub-…..’;
    var gcse = document.createElement(‘script’);
    gcse.type = ‘text/javascript’;
    gcse.async = true;
    gcse.src = (document.location.protocol == ‘https:’ ? ‘https:’ : ‘http:’) +
    ‘//cse.google.com/cse.js?cx=’ + cx;
    var s = document.getElementsByTagName(‘script’)[0];
    s.parentNode.insertBefore(gcse, s);
    })();
    </script>
    <gcse:searchresults-only></gcse:searchresults-only>

    Which is the name to exclude optimizing (Folgende Skripte von Autoptimize ausschließen) it from Plugin Autoptimize?

    Thank you for help
    Mustermann

    https://wordpress.org/plugins/autoptimize/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frank Goossens

    (@futtta)

    lots to choose from, you could exclude based on;

    • cse.google.com
    • gcse
    • partner-pub

    or you could wrap the entire block between noptimize-tags (cfr. example in the FAQ)?

    frank

    Thread Starter mustermann

    (@mustermann)

    Hi Frank,
    thanks for the ideas. It did not work and it must be another problem.

    It works in Safiri (MAC) and Google Chrome (MAC) IE 10 (Win 7) but not in Firefox 40.0 (MAC).

    Plugin Author Frank Goossens

    (@futtta)

    the question; does it work in Safari&Chrome on Mach in IE10 on Win7 without one of the above configurations? and is there an error in the developer console on FF on Mac problem which indicates what is going on?

    frank

    Thread Starter mustermann

    (@mustermann)

    Hi Frank,
    the solution for Firefox 40.0 is found. This browser allowed only one script in a webpage and then the results for search are displayed:

    If you have a Seachbox and a website for the “Google Custom Search” it is neccessary to remove one of the scripts and use only the search and display script for the result page. In a second search box you can put the mentioned script in my first note.

    All other browsers did not have this restricts!

    Thank you for your time.
    Mustermann

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Script Google Custom Search shows display no entries’ is closed to new replies.