<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Tag: search.php</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Fri, 24 May 2013 21:33:24 +0000</pubDate>

<item>
<title>helgatheviking on "Replacing Wordpress search with Google"</title>
<link>http://themeshaper.com/forums/topic/replacing-wordpress-search-with-google#post-24205</link>
<pubDate>Thu, 08 Dec 2011 12:14:21 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24205@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;no tutorials that i know of.  your code for replacing the search loop looks fine.  however, if you are getting a 404 then your loop isn't the problem.
&#60;/p&#62;</description>
</item>
<item>
<title>Nate H on "Replacing Wordpress search with Google"</title>
<link>http://themeshaper.com/forums/topic/replacing-wordpress-search-with-google#post-24184</link>
<pubDate>Wed, 07 Dec 2011 20:22:05 +0000</pubDate>
<dc:creator>Nate H</dc:creator>
<guid isPermaLink="false">24184@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I must be missing something. Is there a tutorial for adding a Google Custom Search to Thematic? &#60;/p&#62;
&#60;p&#62;Thanks again for the help.
&#60;/p&#62;</description>
</item>
<item>
<title>Nate H on "Replacing Wordpress search with Google"</title>
<link>http://themeshaper.com/forums/topic/replacing-wordpress-search-with-google#post-24177</link>
<pubDate>Wed, 07 Dec 2011 03:18:05 +0000</pubDate>
<dc:creator>Nate H</dc:creator>
<guid isPermaLink="false">24177@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thank you for the help!&#60;/p&#62;
&#60;p&#62;I found this tutorial:&#60;br /&#62;
&#60;a href=&#34;http://www.newtechie.com/2011/11/how-to-add-google-custom-search-to.html#axzz1fmuG5yr5&#34; rel=&#34;nofollow&#34;&#62;http://www.newtechie.com/2011/11/how-to-add-google-custom-search-to.html#axzz1fmuG5yr5&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Which uses the Two Page layout method. I get a 404'd when I tried getting it to work.&#60;/p&#62;
&#60;p&#62;Here is my latest attempt, that isn't working, at removing the Thematic loop and adding the google code within the functions.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// remove the standard search loop
function remove_search_loop() {
	remove_action(&#38;#39;thematic_searchloop&#38;#39;, &#38;#39;thematic_search_loop&#38;#39;);
}
add_action(&#38;#39;wp&#38;#39;, &#38;#39;remove_search_loop&#38;#39;);
// create your own search loop

function my_search_loop() {
// Your content goes in here
 &#38;lt;?php if ( have_posts() ) : ?&#38;gt;
&#38;lt;div id=&#38;quot;cse&#38;quot; style=&#38;quot;width: 100%;&#38;quot;&#38;gt;Loading&#38;lt;/div&#38;gt;
&#38;lt;script src=&#38;quot;//www.google.com/jsapi&#38;quot; type=&#38;quot;text/javascript&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
  function parseQueryFromUrl () {
    var queryParamName = &#38;quot;s&#38;quot;;
    var search = window.location.search.substr(1);
    var parts = search.split(&#38;#39;&#38;#38;&#38;#39;);
    for (var i = 0; i &#38;lt; parts.length; i++) {
      var keyvaluepair = parts[i].split(&#38;#39;=&#38;#39;);
      if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {
        return decodeURIComponent(keyvaluepair[1].replace(/\+/g, &#38;#39; &#38;#39;));
      }
    }
    return &#38;#39;&#38;#39;;
  }

  google.load(&#38;#39;search&#38;#39;, &#38;#39;1&#38;#39;, {language : &#38;#39;en&#38;#39;, style : google.loader.themes.MINIMALIST});
  google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl(
      &#38;#39;XXXXXXXXXXXXXXXXXXXXXX&#38;#39;);

    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    customSearchControl.draw(&#38;#39;cse&#38;#39;);
    var queryFromUrl = parseQueryFromUrl();
    if (queryFromUrl) {
      customSearchControl.execute(queryFromUrl);
    }
  }, true);
&#38;lt;/script&#38;gt;
&#38;lt;?php endif; ?&#38;gt;
add_action(&#38;#39;thematic_searchloop&#38;#39;, &#38;#39;my_search_loop&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>helgatheviking on "Replacing Wordpress search with Google"</title>
<link>http://themeshaper.com/forums/topic/replacing-wordpress-search-with-google#post-24175</link>
<pubDate>Wed, 07 Dec 2011 01:32:47 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24175@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;thematic_search_form() is the form&#60;/p&#62;
&#60;p&#62;and &#60;/p&#62;
&#60;p&#62;thematic_searchloop() is the results&#60;/p&#62;
&#60;p&#62;don't know if that helps
&#60;/p&#62;</description>
</item>
<item>
<title>Nate H on "Replacing Wordpress search with Google"</title>
<link>http://themeshaper.com/forums/topic/replacing-wordpress-search-with-google#post-24174</link>
<pubDate>Tue, 06 Dec 2011 19:55:45 +0000</pubDate>
<dc:creator>Nate H</dc:creator>
<guid isPermaLink="false">24174@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Aloha,&#60;br /&#62;
I have been trying to get Google search results on my webpage and seem to be missing something. I have found no plugin that will work, because google recently changed their Custom Google Search Control panel to not have an iframe option.&#60;/p&#62;
&#60;p&#62;I thought I was getting somewhere with this article, but it seems like Thematic overrides the search results page:  &#60;a href=&#34;http://iamtgc.com/2011/07/10/integrating-a-google-custom-search-engine-into-your-wordpress-blog/&#34; rel=&#34;nofollow&#34;&#62;http://iamtgc.com/2011/07/10/integrating-a-google-custom-search-engine-into-your-wordpress-blog/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Any insight would be very much appreciated.&#60;/p&#62;
&#60;p&#62;Thank You,&#60;br /&#62;
Nate
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "how to edit Search.php?"</title>
<link>http://themeshaper.com/forums/topic/how-to-edit-searchphp#post-13394</link>
<pubDate>Fri, 25 Jun 2010 22:29:21 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">13394@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;i have also done what dhales mentioned.  i think b/c the search form itself is not inside the entry-content div... and so was all out of line on me
&#60;/p&#62;</description>
</item>
<item>
<title>dhales on "how to edit Search.php?"</title>
<link>http://themeshaper.com/forums/topic/how-to-edit-searchphp#post-13390</link>
<pubDate>Fri, 25 Jun 2010 19:27:54 +0000</pubDate>
<dc:creator>dhales</dc:creator>
<guid isPermaLink="false">13390@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;It might not be considered the most &#34;clean&#34; way of doing it, but in still keeping line without modifying any of the core thematic files you can simply copy the entire search.php file and paste it into your childtheme directory. Thereby overwriting the thematic search.php without actually modifying the original one.
&#60;/p&#62;</description>
</item>
<item>
<title>ductiletoaster on "how to edit Search.php?"</title>
<link>http://themeshaper.com/forums/topic/how-to-edit-searchphp#post-13120</link>
<pubDate>Tue, 15 Jun 2010 20:53:17 +0000</pubDate>
<dc:creator>ductiletoaster</dc:creator>
<guid isPermaLink="false">13120@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ok basically im building a child theme and have up untill now been able to use hooks and filters to do what i needed. However there is an if else statement in need to edit in the search.php (specifically the else section)&#60;/p&#62;
&#60;p&#62;else {&#60;br /&#62;
?&#38;gt;&#60;br /&#62;
&#38;lt;div id=&#34;post-0&#34; class=&#34;post noresults&#34;&#38;gt;&#60;br /&#62;
&#38;lt;h1 class=&#34;entry-title&#34;&#38;gt;&#38;lt;?php _e('Nothing Found', 'thematic') ?&#38;gt;&#38;lt;/h1&#38;gt;&#60;br /&#62;
&#38;lt;div class=&#34;entry-content&#34;&#38;gt;&#60;br /&#62;
&#38;lt;p&#38;gt;&#38;lt;?php _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'thematic') ?&#38;gt;&#38;lt;/p&#38;gt;&#60;br /&#62;
&#38;lt;/div&#38;gt;&#60;br /&#62;
&#38;lt;form id=&#34;noresults-searchform&#34; method=&#34;get&#34; action=&#34;&#38;lt;?php bloginfo('home') ?&#38;gt;&#34;&#38;gt;&#60;br /&#62;
&#38;lt;div&#38;gt;&#60;br /&#62;
&#38;lt;input id=&#34;noresults-s&#34; name=&#34;s&#34; type=&#34;text&#34; value=&#34;&#38;lt;?php echo wp_specialchars(stripslashes($_GET['s']), true) ?&#38;gt;&#34; size=&#34;40&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;input id=&#34;noresults-searchsubmit&#34; name=&#34;searchsubmit&#34; type=&#34;submit&#34; value=&#34;&#38;lt;?php _e('Find', 'thematic') ?&#38;gt;&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;/div&#38;gt;&#60;br /&#62;
&#38;lt;/form&#38;gt;&#60;br /&#62;
&#38;lt;/div&#38;gt;&#38;lt;!-- .post --&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;I would rather avoid editing the search.php file directly because im trying to build a proper child theme! suggestions? thank you ahead of time!!!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
