Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Themes by
closed by


i dont want to use q2a google search plugin

i try to add google script code to my qa-theme.php

function search_widget()
'<aside id="search-4" class="widget widget_search">',
'<p class="widget-title">جستجو در سوالات</p>',

  (function() {
    var cx = '011900192141920744246:n9jj1rxodww';
    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);


but when i open my q2a site , i just see white page

i try to add / before ' to fix error

but still not working

can you help me about output of this script ???


Q2A version: 1.7
closed with the note: problem solved

1 Answer

0 votes
selected by
Best answer

problem solved by using


before output code