Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24881

    Hi:

    We need to integrate Google Custom Search into our Propulsion site and have some code from the Look and Feel section of Google Custom Search. We tested it in the default Twenty Twelve theme by placing it between the IF statements in Twenty Twelve’s search.php and it works great. However, we did not see comparable IF statements in the search.php file of the Propulsion theme.

    Where do we place this in Propulsion’s search.php file? Or is it even possible to make it work? Here is the code, below:

    For general reference, here are the instructions we followed:

    http://bit.ly/11DpGQi

    Thanks!

    *********** CODE BEGIN ****************

    <script>

    (function() {

    var cx = ’011209661031383093312:3plzwqgkyf8′;

    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:searchresults-only></gcse:searchresults-only>

    *********** CODE END ****************

    #125070

    Hey!

    You need to inser the code in wp-contentthemespropulsionincludesloop-search.php – between:

    while (have_posts()) : the_post();

    and

    endwhile;

    Best regards,

    Peter

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Integrating Google Custom Search’ is closed to new replies.