• I created a custom search on Google, where I selected the sites that will be searched.I got HTML code for how to display the search box on my site, but when I paste it into the TEXT tab of a page post, all I get when I preview is … on the site page.

    I am using StudioPress Balance theme (Genesis framework)
    I would like for this search to be on its own page (not post)

    Here is what I got from Google for HTML — do I need to add something or fix it in some way? I am not a big coder. I added (‘) to the beginning and end as noted in the forum instructions. It actually starts with

    `<html>
    <head>
    <title>Nurse’s Notebook Custom Search</title>

    <head>
    <body>
    <div1>…</div1>
    <script>
    (function() {
    var cx = ‘001773844383145714689:2_pxgyzzkb8’;
    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:searchbox></gcse:searchbox>
    <div2>…</div2>
    </body>
    </html>’

    This is what I get: https://nursesnotebook.com/1374-2/

    One of the Google troubleshooting tips was to add
    ‘<!DOCTYPE html>’
    at the top, which I did and it didn’t make any difference. Is there another place I should put it, or is there something special I need to do?

    Thank you!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Trouble with posting Google Custom Search (not site search)’ is closed to new replies.