<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Filter and sort result list]]></title><description><![CDATA[<p dir="auto">Do we have ability to sort and filter search result? For example, filter result by pages / pdf / doc / etc? Sort by relevance or date?<br />
Maybe you have values that I can use to rewrite a query?</p>
]]></description><link>https://fulltextsearch.org/forum/topic/85/filter-and-sort-result-list</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Mar 2026 23:10:49 GMT</lastBuildDate><atom:link href="https://fulltextsearch.org/forum/topic/85.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Jun 2021 07:17:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Filter and sort result list on Thu, 01 Jul 2021 05:26:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ilocimwca">@<bdi>ilocimwca</bdi></a></p>
<p dir="auto">It's simple to do with this addon<br />
<a href="https://fulltextsearch.org/wpfts-addon-files-only-1.0.1.zip" rel="nofollow ugc">https://fulltextsearch.org/wpfts-addon-files-only-1.0.1.zip</a></p>
<p dir="auto">It contains some code to limit post_type to 'attachment' only:</p>
<pre><code>add_action('pre_get_posts', function(&amp;$wpq)
{
	if ($wpq-&gt;is_search &amp;&amp; $wpq-&gt;is_main_query()) {
		$wpq-&gt;set('post_type', array('attachment'));
		$wpq-&gt;set('post_status', array('inherit'));
	}
});
</code></pre>
<p dir="auto">Pretty simple. If you want to set up your own post_types, just modify this code. You can read about full WP_Query() parameters <a href="https://developer.wordpress.org/reference/classes/wp_query/" rel="nofollow ugc">at the Wordpress official documentation</a>.</p>
]]></description><link>https://fulltextsearch.org/forum/post/229</link><guid isPermaLink="true">https://fulltextsearch.org/forum/post/229</guid><dc:creator><![CDATA[EpsilonAdmin]]></dc:creator><pubDate>Thu, 01 Jul 2021 05:26:09 GMT</pubDate></item><item><title><![CDATA[Reply to Filter and sort result list on Tue, 29 Jun 2021 08:07:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/epsilonadmin">@<bdi>epsilonadmin</bdi></a> I planned pre_get_posts. How to filter to show only <em>pdf</em> or only <em>web pages</em>?</p>
]]></description><link>https://fulltextsearch.org/forum/post/226</link><guid isPermaLink="true">https://fulltextsearch.org/forum/post/226</guid><dc:creator><![CDATA[ILOCIMWCA]]></dc:creator><pubDate>Tue, 29 Jun 2021 08:07:29 GMT</pubDate></item><item><title><![CDATA[Reply to Filter and sort result list on Fri, 25 Jun 2021 15:10:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ilocimwca">@<bdi>ilocimwca</bdi></a></p>
<p dir="auto">Yes, of course, all the same values that you're usually using for WP_Query() will work!</p>
<p dir="auto">You can specify parameters in case you want to call WP_Query() manually or you can use the pre_get_posts hook in case you want to intercept the main query.</p>
<p dir="auto">What do you actually plan to do?</p>
]]></description><link>https://fulltextsearch.org/forum/post/225</link><guid isPermaLink="true">https://fulltextsearch.org/forum/post/225</guid><dc:creator><![CDATA[EpsilonAdmin]]></dc:creator><pubDate>Fri, 25 Jun 2021 15:10:57 GMT</pubDate></item></channel></rss>