<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Customised search scope in WordPress</title>
	<atom:link href="http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/</link>
	<description>Ovine Perspectives On The Digital Age</description>
	<lastBuildDate>Sat, 04 Feb 2012 00:53:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ben Hayes</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-597</link>
		<dc:creator>Ben Hayes</dc:creator>
		<pubDate>Tue, 27 Sep 2011 09:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-597</guid>
		<description>Thanks adsf. Yep, that seems like a better approach.

Will have to fix my contact page link too ;)</description>
		<content:encoded><![CDATA[<p>Thanks adsf. Yep, that seems like a better approach.</p>
<p>Will have to fix my contact page link too <img src='http://www.thesheep.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asdf</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-596</link>
		<dc:creator>asdf</dc:creator>
		<pubDate>Mon, 26 Sep 2011 14:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-596</guid>
		<description>I just wanted to email you what I consider proper solution, but your contact page doesn&#039;t work. Well, here&#039;s the snippet from my theme&#039;s search.php:

http://pastebin.com/XqsUbY0a

Of course, don&#039;t copy it verbatim, it&#039;s specific for my use case. I didn&#039;t filter by category, I needed a filter by parent page, but the logic is the same. You could filter by category by adding &#039;category_name&#039; =&gt; &#039;abc&#039; in $query_args (I didn&#039;t test that, though).</description>
		<content:encoded><![CDATA[<p>I just wanted to email you what I consider proper solution, but your contact page doesn&#8217;t work. Well, here&#8217;s the snippet from my theme&#8217;s search.php:</p>
<p><a href="http://pastebin.com/XqsUbY0a" rel="nofollow">http://pastebin.com/XqsUbY0a</a></p>
<p>Of course, don&#8217;t copy it verbatim, it&#8217;s specific for my use case. I didn&#8217;t filter by category, I needed a filter by parent page, but the logic is the same. You could filter by category by adding &#8216;category_name&#8217; =&gt; &#8216;abc&#8217; in $query_args (I didn&#8217;t test that, though).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Hayes</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-594</link>
		<dc:creator>Ben Hayes</dc:creator>
		<pubDate>Fri, 23 Sep 2011 08:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-594</guid>
		<description>Good point adsf, I hadn&#039;t realised that paging would not reflect the filtered results. Well, I did say it was a hacky solution :)

Yes, I think you&#039;re right, the better solution would be to construct a custom query, asking it to return only the category you are interested in, based on the scope variable.</description>
		<content:encoded><![CDATA[<p>Good point adsf, I hadn&#8217;t realised that paging would not reflect the filtered results. Well, I did say it was a hacky solution <img src='http://www.thesheep.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Yes, I think you&#8217;re right, the better solution would be to construct a custom query, asking it to return only the category you are interested in, based on the scope variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asdf</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-593</link>
		<dc:creator>asdf</dc:creator>
		<pubDate>Fri, 23 Sep 2011 08:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-593</guid>
		<description>This is a bad solution, the results count and paging is still for the full set of results. A correct solution would modify the loop query, I still have to figure out how exactly to do that.</description>
		<content:encoded><![CDATA[<p>This is a bad solution, the results count and paging is still for the full set of results. A correct solution would modify the loop query, I still have to figure out how exactly to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Hayes</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-294</link>
		<dc:creator>Ben Hayes</dc:creator>
		<pubDate>Fri, 22 May 2009 08:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-294</guid>
		<description>In that case it may be better to run a custom query on the WP database. 

I think you could still detect your various search parameters via $_GET variable. Then use those parameters to construct a custom query using $wpdb-&gt;get_results(). See http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query for more info.

Good luck!</description>
		<content:encoded><![CDATA[<p>In that case it may be better to run a custom query on the WP database. </p>
<p>I think you could still detect your various search parameters via $_GET variable. Then use those parameters to construct a custom query using $wpdb-&gt;get_results(). See <a href="http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query" rel="nofollow">http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query</a> for more info.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-293</link>
		<dc:creator>Steven</dc:creator>
		<pubDate>Fri, 22 May 2009 06:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-293</guid>
		<description>i would appreciate it if you do post up a working example.

my problem is i want to be able to custom my search to ONLY certain categories, and ONLY by certain fields (Titles) or by custom fields (actors.)

as you may guess, i&#039;m doing a movie review site.

any help is appreciated, thanks</description>
		<content:encoded><![CDATA[<p>i would appreciate it if you do post up a working example.</p>
<p>my problem is i want to be able to custom my search to ONLY certain categories, and ONLY by certain fields (Titles) or by custom fields (actors.)</p>
<p>as you may guess, i&#8217;m doing a movie review site.</p>
<p>any help is appreciated, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Hayes</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-281</link>
		<dc:creator>Ben Hayes</dc:creator>
		<pubDate>Tue, 05 May 2009 09:32:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-281</guid>
		<description>Hi Bjarni

I have a working example but currently on a development server only, for a client project. Guess I could make a public working version sometime when I get a moment, if you think that&#039;s useful.

Ben</description>
		<content:encoded><![CDATA[<p>Hi Bjarni</p>
<p>I have a working example but currently on a development server only, for a client project. Guess I could make a public working version sometime when I get a moment, if you think that&#8217;s useful.</p>
<p>Ben</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjarni</title>
		<link>http://www.thesheep.co.uk/2009/05/01/customised-search-scope-in-wordpress/comment-page-1/#comment-280</link>
		<dc:creator>Bjarni</dc:creator>
		<pubDate>Sun, 03 May 2009 23:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.thesheep.co.uk/?p=169#comment-280</guid>
		<description>Hi there, do you have a working example of the above? sounds good.</description>
		<content:encoded><![CDATA[<p>Hi there, do you have a working example of the above? sounds good.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

