<?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>WP-Simple &#187; поиск</title>
	<atom:link href="http://www.wp-simple.ru/tag/poisk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wp-simple.ru</link>
	<description>Подсказки, советы, тюнинг, хаки, новости, плагины и темы WordPress</description>
	<lastBuildDate>Thu, 04 Feb 2010 07:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Исключаем ненужные страницы из поиска по блогу</title>
		<link>http://www.wp-simple.ru/exclude-pages-from-search.html</link>
		<comments>http://www.wp-simple.ru/exclude-pages-from-search.html#comments</comments>
		<pubDate>Sat, 26 Dec 2009 22:18:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Новые функции]]></category>
		<category><![CDATA[Подсказки и полезные советы]]></category>
		<category><![CDATA[поиск]]></category>

		<guid isPermaLink="false">http://www.wp-simple.ru/?p=71</guid>
		<description><![CDATA[Не очень красивое название получилось, объясню смысл более подробно. Возможно вам понадобиться чтобы поиск по блогу не трогал некоторые страницы, такие как about, контакты или реклама. Тогда мой совет пригодится вам.
Вставляем, приведенный ниже код в файл function.php вашей темы.
function SearchFilter($query) {
    if ($query-&#62;is_search) {
        $query-&#62;set('cat','2,21');
 [...]]]></description>
			<content:encoded><![CDATA[<p>Не очень красивое название получилось, объясню смысл более подробно. Возможно вам понадобиться чтобы поиск по блогу не трогал некоторые страницы, такие как about, контакты или реклама. Тогда мой совет пригодится вам.</p>
<p>Вставляем, приведенный ниже код в файл function.php вашей темы.</p>
<blockquote><pre>function SearchFilter($query) {
    if ($query-&gt;is_search) {
        $query-&gt;set('cat','2,21');
    }
    return $query;
}

add_filter('pre_get_posts','SearchFilter');</pre>
</blockquote>
<p>В примере указаны посты с номерами ID равными 2 и 21. Теперь эти посты не участвуют в поиске.</p>
<div id="crp_related"><ul><li><a href="http://www.wp-simple.ru/recent-comments-with-gravatar.html" rel="bookmark">Gravatar комментаторов</a></li><li><a href="http://www.wp-simple.ru/post-by-excerpts.html" rel="bookmark">Вывод укороченной новости</a></li><li><a href="http://www.wp-simple.ru/function-words-count.html" rel="bookmark">Подсчет слов в статье</a></li><li><a href="http://www.wp-simple.ru/automatically-remove-nofollow-from-posts.html" rel="bookmark">Автоматическое удаление Nofollow из постов</a></li><li><a href="http://www.wp-simple.ru/hook-for-add-favicon-to-theme-wordpress.html" rel="bookmark">Хук для установки favicon в тему WordPress</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.wp-simple.ru/exclude-pages-from-search.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
