<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ZX:rishistar programming blocks &#187; search facility</title>
	<atom:link href="http://rishistar.com/zx/tag/search-facility/feed/" rel="self" type="application/rss+xml" />
	<link>http://rishistar.com/zx</link>
	<description>Java/Wordpress programming tips and tricks</description>
	<lastBuildDate>Thu, 28 Jul 2011 22:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Including Custom Search Results In A WordPress Page</title>
		<link>http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/</link>
		<comments>http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 15:58:56 +0000</pubDate>
		<dc:creator>rishi</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[search facility]]></category>

		<guid isPermaLink="false">http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/</guid>
		<description><![CDATA[One website required certain pages to contain custom search results. To do this I needed to have the following code. The main tricks here are to create a second query as well as the main page query using the WP_Query method, and that the parameter for such a query needs an s=&#8230; to let it [...]]]></description>
			<content:encoded><![CDATA[<p>One website required certain pages to contain custom search results. </p>
<p>To do this I needed to have the following code. The main tricks here are to create a second query as well as the main page query using the WP_Query method, and that the parameter for such a query needs an s=&#8230; to let it know the phrase being supplied is a search term.</p>
<p>The get_post_meta() method allows extraction from the main page extra parameter list.</p>
<p><font color="#800040">&lt;?php     <br /></font><font color="#800040">     <br />$query_string = get_post_meta($post-&gt;ID, &#8216;organism_class&#8217;, true) ;       <br /></font><font color="#800040">$search = new WP_Query( &quot;s=$query_string&amp;showposts=5&quot; ) ;     <br />$search_posts = $search-&gt;query( &quot;s=$query_string&amp;showposts=5&quot; ) ; </font></p>
<p><font color="#800040"> while ($search-&gt;have_posts()) : $search-&gt;the_post();     <br />?&gt; </font></p>
<p><font color="#800040">&lt;h4&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h4&gt;     <br />&lt;?php the_content(); ?&gt;      <br /></font></p>
<p><font color="#800040">&lt;?php endwhile; ?&gt;</font></p>
]]></content:encoded>
			<wfw:commentRss>http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

