<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>正貢堂 パティスリーショウコウドウ &#187; wordpress</title>
	<atom:link href="http://www.okasi.org/tag/wordpress-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.okasi.org</link>
	<description></description>
	<lastBuildDate>Sun, 09 Feb 2020 12:26:56 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.okasi.org/tag/wordpress-2/feed/" />
		<item>
		<title>【WordPress】トップページに特定のカテゴリーを表示しない</title>
		<link>http://www.okasi.org/query-posts-cat/</link>
		<comments>http://www.okasi.org/query-posts-cat/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 12:51:04 +0000</pubDate>
		<dc:creator>正貢堂スタッフ</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ジュンのブログ]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.okasi.org/?p=1780</guid>
		<description><![CDATA[新規カテゴリーに自分のブログを追加したので、 自分のブログをトップページに表示し &#8230; <a href="http://www.okasi.org/query-posts-cat/">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>新規カテゴリーに自分のブログを追加したので、<br />
自分のブログをトップページに表示しない方法を調べました。<span id="more-1780"></span><br />
<span class="source-code_title">index.php（メインインデックスのテンプレート）</span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php query_posts('cat=-除きたいカテゴリー番号&amp;posts_per_page=1ページに表示する記事数&amp;paged='.$paged); ?&gt;
&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;</pre>
<p>ただしこのままだとカテゴリーで除いたページ数だけ上のページナビ（Twenty Elevenのテーマ）に余りが出たので、</p>
<p><span class="source-code_title">index.php（メインインデックスのテンプレート）</span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php query_posts('cat=-除きたいカテゴリー番号（複数指定カンマ区切り）&amp;posts_per_page=1ページに表示する記事数&amp;paged='.$paged); ?&gt;
&lt;?php twentyeleven_content_nav( 'nav-above' ); ?&gt;
&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;</pre>
<p>nav-aboveを上の位置に入れ込んだら正常に動きました！</p>
<h2>Newpost Catchで特定のカテゴリーを除く方法</h2>
<p>そして自分は最近の投稿に画像を出せるNewpost Catchを使わせてもらってるので、<br />
そこからも特定のカテゴリーを除こうと。</p>
<p><span class="source-code_title">newpost-catch/class.php</span></p>
<pre class="brush: php; title: ; notranslate">query_posts(&quot;cat=-除きたいカテゴリー&amp;showposts=&quot; . $number . &quot;&amp;ignore_sticky_posts=1&quot; );</pre>
<p>これでいけました<img src="http://www.okasi.org/wordpress/wp-content/plugins/WP-Emoji2-master/images/happy02.gif" alt="うれしい顔" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.okasi.org/query-posts-cat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.okasi.org/query-posts-cat/" />
	</item>
	</channel>
</rss>
