<?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>WordPressでホームページ制作 太陽ブログ &#187; web制作メモおよび独り言</title>
	<atom:link href="http://web-taiyo.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://web-taiyo.com</link>
	<description>効果の高いHP制作はワードプレスで！　何でもご相談ください</description>
	<lastBuildDate>Sat, 19 May 2012 09:32:05 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>サイドバーの高さを揃える</title>
		<link>http://web-taiyo.com/works/120519.html</link>
		<comments>http://web-taiyo.com/works/120519.html#comments</comments>
		<pubDate>Sat, 19 May 2012 09:32:05 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=3063</guid>
		<description><![CDATA[サイドバーの下まで背景があり、一番下にバナーを配置と言うデザインなので、ここで紹介されていた equalbox.js を利用した。 揃えたい要素のIDを指定するだけなので簡単。 *css で調整する方法だと「ポジションでボトムに配置」がダメだったので。]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>サイドバーの下まで背景があり、一番下にバナーを配置と言うデザインなので、<a href="http://coliss.com/articles/build-websites/operation/javascript/jquery-plugin-equalbox.html" title="異なる高さのdiv要素の高さを揃えるだけのシンプルなスクリプト" class="popup">ここ</a>で紹介されていた equalbox.js を利用した。<br />
揃えたい要素のIDを指定するだけなので簡単。</p>
<p>*css で調整する方法だと「ポジションでボトムに配置」がダメだったので。</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120519.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>タブ切り替えでサブメニューの表示</title>
		<link>http://web-taiyo.com/works/120511.html</link>
		<comments>http://web-taiyo.com/works/120511.html#comments</comments>
		<pubDate>Fri, 11 May 2012 05:10:17 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=3051</guid>
		<description><![CDATA[フレームで作成されたHPをワードプレスへ…上のフレームでサブメニューが切り替えられているのをどう実装するか。 サブメニューの中には外部リンクのみページもあって条件分岐だけでは間に合わないので、タブで切り替えることにした。 使わせてもらったのはここで紹介されているもの。 サブメニューに表示するページはカスタムフィールドでグループ分けして wp_list_pages(&#8216;meta_key=g ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>フレームで作成されたHPをワードプレスへ…上のフレームでサブメニューが切り替えられているのをどう実装するか。<br />
サブメニューの中には外部リンクのみページもあって条件分岐だけでは間に合わないので、タブで切り替えることにした。</p>
<p>使わせてもらったのは<a href="http://www.finefinefine.jp/web/kiji422/" title="タブの切替" class="popup">ここ</a>で紹介されているもの。</p>
<p>サブメニューに表示するページはカスタムフィールドでグループ分けして wp_list_pages(&#8216;meta_key=group&#038;meta_value=メタキーgroupの値&#038;title_li=&#8217;) で表示。<br />
開いておくタブと閉じておくタブのクラスも if (get_post_meta($post->ID,&#8217;group&#8217;,true) == &#8216;メタキーgroupの値&#8217;): で条件分岐。</p>
<p>ちょっとメモ：構成の都合上、あるカテゴリーの最新記事にリンクする必要があったので、<br />
$loop = new WP_query(&#8216;category_name=xxxx&#038;showposts=1&#8242;); while ($loop->have_posts()) : $loop->the_post();<br />
$url = get_permalink($post->ID);<br />
endwhile;<br />
echo $url;<br />
とした。</p>
<div id="seo_alrp_related"><h2>タブ切り替えでサブメニューの表示 の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/120214.html" rel="bookmark">Magic Fields 覚書4</a></h3><p>申し込みのためのテキストと申込書へのリンクが対象者別に複数あるので、フィールドグループ「申し込み」を複製可とし、別に「締め切り」チェックボックスを作成。 申込書へのリンク部分は申込書のアップロードがある場合のみ表示、「締め切り」にチェックを入れると全て非表示。 [sourcecode language='php']</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120220.html" rel="bookmark">ワードプレスをもっとわかりやすくするために2 設定ページを作る</a></h3><p>例えば各ページのタイトル画像やスライドの画像、サイドバーのバナーなどを管理画面で簡単に変更したり追加したりしたい、という要望もよくあります。 ウィジェットやプラグインで実装する方法もありますが、設定箇所があちこちバラバラなのもわかりにくいし、ピッタリ来るものが見つからない場合もあり、それならMagic Fields で設定ページを作り、カスタムフィールドの値をテーマに読み込む方が早いな、ということで、管理画面で変更したいと言われたら… page、single、デフォルトの編集欄非表示でライトパネルを作成し、非公開設定でページを作成します。ライトパネルの名称は日本語で良いのでわかりやすい名称にします。 *管理画面メニューの項目に追加されるのでアクセスもしやすい ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120331.html" rel="bookmark">Magic Fields の使い方 タグ編 複製</a></h3><p>フィールドの複製 [sourcecode language='php'][/sourcecode] イメージフィールドの複製 [sourcecode language='php'][/sourcecode] ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/111228.html" rel="bookmark">Magic Fields 覚書3</a></h3><p>イメージフィールドを含むフィールドグループの複製時、画像がアップロードされている場合のみimgタグを出力 グループ名：group、フィールド名：image1 [sourcecode language='php']if($group['image1'][1]['o']!="") { echo ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/110203.html" rel="bookmark">Magic Fields 覚書</a></h3><p>プルダウンリスト [sourcecode language='php'] [/sourcecode] チェックボックスリスト [sourcecode ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120511.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>グリッド状にきれいに並べる</title>
		<link>http://web-taiyo.com/works/120428.html</link>
		<comments>http://web-taiyo.com/works/120428.html#comments</comments>
		<pubDate>Sat, 28 Apr 2012 13:40:12 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=3042</guid>
		<description><![CDATA[投稿の一覧などで、フロートさせて並べる時、ずれないように一列ずつ括ったりするのだけど 一列につき3件：&#60;?php if (have_posts()) : ?&#62; &#60;?php $post_count = 1; echo &#039;&#60;div class=&#34;clearfix&#34;&#62;&#039; . &#34;\n&#34;; ?&#62; &#60;?php ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>投稿の一覧などで、フロートさせて並べる時、ずれないように一列ずつ括ったりするのだけど</p>
<pre class="brush: php; ">
一列につき3件：&lt;?php if (have_posts()) : ?&gt;
&lt;?php $post_count = 1;
echo &#039;&lt;div class=&quot;clearfix&quot;&gt;&#039; . &quot;\n&quot;;
?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;

～

&lt;?php if ( $post_count % 3 == 0 &amp;&amp; $post_count != 1 ) { echo &#039;&lt;/div&gt;&#039; . &quot;\n&quot; . &#039;&lt;div class=&quot;clearfix&quot;&gt;&#039; . &quot;\n&quot;; } ?&gt;
&lt;?php $post_count++; ?&gt;
&lt;?php endwhile; ?&gt;
&lt;?php echo &#039;&lt;/div&gt;&#039; . &quot;\n&quot;; ?&gt;
&lt;?php endif; ?&gt;
</pre>
<p>Magic Fields のフィールドグループを複製時に一列ずつ括るというのが思いつかなかったので、jquery.vgrid.js を使って並べてみた。<br />
css を書くのも楽なのでおすすめです。<a href="http://blog.xlune.com/2009/09/jqueryvgrid.html" title="jquery.vgrid.js" class="popup">http://blog.xlune.com/2009/09/jqueryvgrid.html</a></p>
<div id="seo_alrp_related"><h2>グリッド状にきれいに並べる の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/magic-fields.html" rel="bookmark">Magic Fields で投稿テンプレート</a></h3><p>カスタムフィールドプラグインMagic Fields は write panel を作成すると、↓のようにそれぞれの名前で新規投稿と編集画面が出来る。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120302.html" rel="bookmark">Magic Fields の使い方 タグ編</a></h3><p>Magic Fields で設定したカスタムフィールドの値をテーマで表示するには [sourcecode language='php'][/sourcecode] テキストフィールド、ラジオボタン、プルダウンはこれで表示できる。チェックボックスリストの場合は ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120331.html" rel="bookmark">Magic Fields の使い方 タグ編 複製</a></h3><p>フィールドの複製 [sourcecode language='php'][/sourcecode] イメージフィールドの複製 [sourcecode language='php'][/sourcecode] ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/120324.html" rel="bookmark">Magic Fields の使い方 related type</a></h3><p>Magic Fileds で設定できるフィールドには related type というのがある。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/110203.html" rel="bookmark">Magic Fields 覚書</a></h3><p>プルダウンリスト [sourcecode language='php'] [/sourcecode] チェックボックスリスト [sourcecode ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120428.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>期間を指定して表示</title>
		<link>http://web-taiyo.com/works/120424.html</link>
		<comments>http://web-taiyo.com/works/120424.html#comments</comments>
		<pubDate>Tue, 24 Apr 2012 14:52:36 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=3032</guid>
		<description><![CDATA[お知らせの一覧で、特定の投稿（カスタムフィールドでキー：期間指定、値：on）を指定した期間内のみ表示させる &#60;?php if (have_posts()) : ?&#62; &#60;?php while (have_posts()) : the_post(); ?&#62; &#60;?php if(get_post_meta($post-&#62;ID,&#039;期間指定&#039;,true) ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>お知らせの一覧で、特定の投稿（カスタムフィールドでキー：期間指定、値：on）を指定した期間内のみ表示させる</p>
<pre class="brush: php; ">
&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
&lt;?php if(get_post_meta($post-&gt;ID,&#039;期間指定&#039;,true) == &#039;on&#039;): ?&gt;
&lt;?
$start_date = &quot;0401&quot;;
$end_date   = &quot;0531&quot;;
?&gt;
&lt;?php if( date(&quot;md&quot;) &gt;= $start_date &amp;&amp; date(&quot;md&quot;) &lt;= $end_date ) { ?&gt;
&lt;?php the_title(); ?&gt;
&lt;?php the_content(&#039;&#039;); ?&gt;
&lt;? } ?&gt;
&lt;?php else: ?&gt;
&lt;?php the_title(); ?&gt;
&lt;?php the_content(&#039;&#039;); ?&gt;
&lt;?php endif; ?&gt;
&lt;?php endwhile;  endif; ?&gt;
</pre>
<div id="seo_alrp_related"><h2>期間を指定して表示 の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/mobile_theme.html" rel="bookmark">携帯表示のカスタマイズ</a></h3><p>1ページの表示件数はPCと共通になるので、容量を小さくするために表示件数を少なくしたい場合は [sourcecode language="php"] [/sourcecode] とする。 プラグイン ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/conditional_tags.html" rel="bookmark">コンディショナルタグの書き方</a></h3><p>例えばトップページとカテゴリーページでサイドバーの表示を変えたい場合など、コンディショナルタグで振り分けることが出来る。 トップページのみ「AAA」を表示する、なら [sourcecode language='php'] AAA [/sourcecode] ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/conditional_tags2.html" rel="bookmark">会員制サイトの条件分岐</a></h3><p>ログインしているユーザーのアバター（アバター設定プラグイン要）とユーザー名を表示、ログインしていないときはログインフォームを表示 [sourcecode language='php'] ログインフォーム [/sourcecode] ログインしているユーザーのIDと表示している著者ページのユーザーIDが一致するとき、プロフィール編集リンクを表示 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/110903-2.html" rel="bookmark">Magic Fields 覚書２</a></h3><p>フィールドグループを複製する中でラジオボタンでの選択結果をif で分岐 [sourcecode language='php']</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/111214.html" rel="bookmark">特定の投稿にフォームからアクセス</a></h3><p>特定の投稿のIDを特定のお客様に送り、フォームにIDを入力して投稿にアクセスするという仕様 [sourcecode language='html'] [/sourcecode] jump.html(固定ページ)で入力された値から投稿のパーマリンクに置き換えてリダイレクト [sourcecode ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120424.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自動整形されるタグをショートコードで</title>
		<link>http://web-taiyo.com/works/120413.html</link>
		<comments>http://web-taiyo.com/works/120413.html#comments</comments>
		<pubDate>Thu, 12 Apr 2012 15:58:47 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=3017</guid>
		<description><![CDATA[私はHPを作り始めたスタートがワードプレスだったこともあって、自動整形ありきでタグやスタイルを書くほうが良いと思っているけれど、既存のhtmlからワードプレスに移行する場合、クリアのついた改行やアンカータグなど、そのまま表示させたい場合もあるということで、 function clear() { return &#039;&#60;br class=&#34;clear&#34; /&#62;&#0 ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>私はHPを作り始めたスタートがワードプレスだったこともあって、自動整形ありきでタグやスタイルを書くほうが良いと思っているけれど、既存のhtmlからワードプレスに移行する場合、クリアのついた改行やアンカータグなど、そのまま表示させたい場合もあるということで、</p>
<pre class="brush: php; ">
function clear() {
    return &#039;&lt;br class=&quot;clear&quot; /&gt;&#039;;
}

add_shortcode(&#039;clear&#039;, &#039;clear&#039;);

function anchorFunc( $atts, $content = null ) {
	return &#039;&lt;a name=&quot;&#039; . $content . &#039;&quot; id=&quot;&#039; . $content . &#039;&quot;&gt;&lt;/a&gt;&#039;;
}
add_shortcode(&#039;anchor&#039;, &#039;anchorFunc&#039;);
</pre>
<p>という設定をしてみた。</p>
<pre class="brush: html; ">
これで、
[clear]は&lt;br class=&quot;clear&quot; /&gt;、
[anchor]xxx[/anchor]は&lt;a name=&quot;xxx&quot; id=&quot;xxx&quot;&gt;&lt;/a&gt;
になる。
</pre>
<div id="seo_alrp_related"><h2>自動整形されるタグをショートコードで の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/works-9.html" rel="bookmark">2つのデザイン</a></h3><p>メインコンテンツとスタッフブログのデザインがまったく違い、ブログ以下に複数のカテゴリー。メインコンテツも複数のカテゴリーでカテゴリーのトップは固定（なぜページコンテンツにしないかというと、ページコンテンツで親子関係をつけるよりもカテゴリーを選んで投稿するほうが簡単という理由らしい）、という、ワードプレスで組むにはちょっと特殊な構成のサイト。 ブログ以下の子カテゴリーで投稿すればスタッフブログのデザインで表示できるようにブログ用のphpを作成し、 *functions.php に [sourcecode language='php']function ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/conditional_tags.html" rel="bookmark">コンディショナルタグの書き方</a></h3><p>例えばトップページとカテゴリーページでサイドバーの表示を変えたい場合など、コンディショナルタグで振り分けることが出来る。 トップページのみ「AAA」を表示する、なら [sourcecode language='php'] AAA [/sourcecode] ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/conditional_tags2.html" rel="bookmark">会員制サイトの条件分岐</a></h3><p>ログインしているユーザーのアバター（アバター設定プラグイン要）とユーザー名を表示、ログインしていないときはログインフォームを表示 [sourcecode language='php'] ログインフォーム [/sourcecode] ログインしているユーザーのIDと表示している著者ページのユーザーIDが一致するとき、プロフィール編集リンクを表示 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/110824.html" rel="bookmark">the_categoryから特定のカテゴリーを除外</a></h3><p>投稿の属しているカテゴリーを表示する際に、親カテゴリーを除外したい時などに。functions.php に記入。 [sourcecode language='php']function the_category_filter($thelist,$separator=', ') ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/110402.html" rel="bookmark">効率よくテーマを作成する覚書１</a></h3><p>できるだけファイル数を少なくすませるために、 テスト環境から移動しても書き換えなくて良いように、 カテゴリーを取得してスラッグを表示（タイトル画像など）、ページスラッグはecho $post-&gt;post_name; [sourcecode language='php'][/sourcecode] ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120413.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>毎日誰かの世話になっている</title>
		<link>http://web-taiyo.com/works/120406.html</link>
		<comments>http://web-taiyo.com/works/120406.html#comments</comments>
		<pubDate>Fri, 06 Apr 2012 14:29:43 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=3002</guid>
		<description><![CDATA[フォトライブラリーの構築で投稿を簡易にするために、シングルページでアイキャッチから元画像にリンクさせ、テーマ(elegantthemes)に付属しているfancybox で開こうと、http://tenderfeel.xsrv.jp/wordpress/830/ を参考にさせてもらった。 さらに、問い合わせフォームに画像No.を付けて送るために（通常、このようなニーズにはメールフォームプロを使うの ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>フォトライブラリーの構築で投稿を簡易にするために、シングルページでアイキャッチから元画像にリンクさせ、テーマ(elegantthemes)に付属しているfancybox で開こうと、<a href="http://tenderfeel.xsrv.jp/wordpress/830/" title="[wp] 投稿サムネイルに記事やフル画像へのリンクを張る" class="popup">http://tenderfeel.xsrv.jp/wordpress/830/</a> を参考にさせてもらった。<br />
さらに、問い合わせフォームに画像No.を付けて送るために（通常、このようなニーズにはメールフォームプロを使うのだけど、今回はクライアントの別サイトでContact Form 7 を使っているので）<a href="http://moralhazard.jp/2011/06/18/contact-form-7%E3%81%AE%E7%89%B9%E5%88%A5%E3%81%AA%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%BF%E3%82%B0%E3%82%92functions-php%E3%81%A7%E8%BF%BD%E5%8A%A0/" title="Contact Form 7の特別なメールタグをfunctions.phpで追加" class="popup">http://moralhazard.jp/2011/06/18/contact-form7の特別なメールタグをfunctions.phpで追加/</a> を参考にさせてもらった。</p>
<p>こういう仕事をしていると余計にだけど、仕事以外でも毎日ネット上でいろいろな情報を得ている。それは、誰かが情報を発信しているからで、毎日誰かの世話になってるなぁ、と。<br />
ありがとうございます。</p>
<div id="seo_alrp_related"><h2>毎日誰かの世話になっている の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/111214.html" rel="bookmark">特定の投稿にフォームからアクセス</a></h3><p>特定の投稿のIDを特定のお客様に送り、フォームにIDを入力して投稿にアクセスするという仕様 [sourcecode language='html'] [/sourcecode] jump.html(固定ページ)で入力された値から投稿のパーマリンクに置き換えてリダイレクト [sourcecode ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/mailform_use.html" rel="bookmark">メールフォームの使い分け</a></h3><p>ワードプレス案件の場合、特に要望がなければメールフォームはプラグインのContact Form 7 を使います。が、これはこれで使い方を覚えてもらわないといけなくもあるので、項目やテキストを普通の投稿と同様に編集したい、もっと簡単に項目を追加したい、確認画面が欲しい等の要望がある場合は他のメールフォームを組み込みます。 CGIのメールフォームを組み込む場合、utf-8 対応のスクリプトを使用し、CGIを呼び出すタグはメールフォーム用のページテンプレートに書きます。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-plugin/search.html" rel="bookmark">絞り込み検索</a></h3><p>特定のカテゴリーを検索 Search By Category：http://wordpress.org/extend/plugins/search-by-category/ プルダウンでカテゴリーを選択して検索。 カテゴリーとタグで絞り込み ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-plan/theme.html" rel="bookmark">WordPressのテーマ(テンプレート)制作</a></h3><p>こんなデザインで、こんな機能で、わかりやすくて更新しやすい…などなど、理想のテーマをお作り致します。 まず、レイアウトや配色など具体的に「こんな感じ」と例を挙げていただくか、ラフデザインをご用意ください。手書きのスケッチを写真に撮っていただいたものでも構いません。 料金は下記が目安になりますが、ご予算は考慮させていただきますのでご相談ください。 インストール・プラグインの設定を含まない場合 基本料金：50,000円 ヘッダーやサイドバー、フッターは全ページ共通、トップページの制作は含みます。*普通のブログ形式でトップページのデザインが不要の場合は40,000円 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/plugin_list2.html" rel="bookmark">仕事でよく使うプラグイン</a></h3><p>TinyMCE Advanced：エディター Platinum SEO Pack：SEO Category ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120406.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magic Fields の使い方 タグ編 複製</title>
		<link>http://web-taiyo.com/blog/120331.html</link>
		<comments>http://web-taiyo.com/blog/120331.html#comments</comments>
		<pubDate>Sat, 31 Mar 2012 10:13:04 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=2991</guid>
		<description><![CDATA[フィールドの複製 &#60;?php $list = get_field_duplicate(&#039;フィールド名&#039;); foreach($list as $element){ echo &#039;&#60;p&#62;&#039;.$element.&#039;&#60;/p&#62;&#039;; } ?&#62; イメージフィールドの複製 &#60;?php $images = getFi ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>フィールドの複製</p>
<pre class="brush: php; ">
&lt;?php $list = get_field_duplicate(&#039;フィールド名&#039;);
foreach($list as $element){
 echo  &#039;&lt;p&gt;&#039;.$element.&#039;&lt;/p&gt;&#039;;
}  ?&gt;
</pre>
<p>イメージフィールドの複製</p>
<pre class="brush: php; ">
&lt;?php
$images = getFieldOrder(&#039;フィールド名&#039;);
foreach($images as $image){
        echo get_image(&#039;フィールド名&#039;,1,$image);
        echo &quot;&lt;br /&gt;&quot;;
} ?&gt;
</pre>
<p>グループの複製</p>
<pre class="brush: php; ">
&lt;?php
$grouplist = get_group(&#039;グループ名&#039;);
  foreach($grouplist as $group){
  echo $group[&#039;フィールド名&#039;][1];
echo &#039;&lt;br /&gt;&#039;;
  echo $group[&#039;フィールド名&#039;][1];
echo &#039;&lt;br /&gt;&#039;;
 }
?&gt;
</pre>
<p>*イメージフィールドはオリジナルサイズの場合$group['フィールド名'][1]['o']、指定したサイズの場合$group['フィールド名'][1]['t']</p>
<p>グループの複製の中でフィールドの複製</p>
<pre class="brush: php; ">
&lt;?php
$grouplist = get_group(&#039;グループ名&#039;); //
  foreach($grouplist as $group){
  echo $group[&#039;フィールド名&#039;][1];
  foreach( $group[&#039;複製するフィールド名&#039;] as $list){
      echo $list;
  }
 }
?&gt;
</pre>
<p>グループの複製は並び替えもできるので、フィールドが1つしかなくてもグループにしたほうが便利</p>
<p>*Magic Fields 2 では書き方が違う部分もあるようなので、http://wiki.magicfields.org/doku.php 参照<br />
求めるタグが見つからないときはhttps://groups.google.com/forum/#!forum/magic-fields で。</p>
<div id="seo_alrp_related"><h2>Magic Fields の使い方 タグ編 複製 の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/magic-fields.html" rel="bookmark">Magic Fields で投稿テンプレート</a></h3><p>カスタムフィールドプラグインMagic Fields は write panel を作成すると、↓のようにそれぞれの名前で新規投稿と編集画面が出来る。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120302.html" rel="bookmark">Magic Fields の使い方 タグ編</a></h3><p>Magic Fields で設定したカスタムフィールドの値をテーマで表示するには [sourcecode language='php'][/sourcecode] テキストフィールド、ラジオボタン、プルダウンはこれで表示できる。チェックボックスリストの場合は ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/120324.html" rel="bookmark">Magic Fields の使い方 related type</a></h3><p>Magic Fileds で設定できるフィールドには related type というのがある。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/110203.html" rel="bookmark">Magic Fields 覚書</a></h3><p>プルダウンリスト [sourcecode language='php'] [/sourcecode] チェックボックスリスト [sourcecode ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/111228.html" rel="bookmark">Magic Fields 覚書3</a></h3><p>イメージフィールドを含むフィールドグループの複製時、画像がアップロードされている場合のみimgタグを出力 グループ名：group、フィールド名：image1 [sourcecode language='php']if($group['image1'][1]['o']!="") { echo ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/blog/120331.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magic Fields の使い方 related type</title>
		<link>http://web-taiyo.com/works/120324.html</link>
		<comments>http://web-taiyo.com/works/120324.html#comments</comments>
		<pubDate>Sat, 24 Mar 2012 14:51:11 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>
		<category><![CDATA[最近の仕事など]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=2976</guid>
		<description><![CDATA[Magic Fileds で設定できるフィールドには related type というのがある。 Magic Fields で作成したライトパネルまたは投稿タイプを指定しておくと、指定した括りの投稿がプルダウンで表示されるので、その中から選択した投稿のIDがカスタムフィールド値として保存される。*カテゴリーごとにライトパネルを作成すればカテゴリー別にできる。 投稿Aの作成時に投稿Bを選択すると、投 ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>Magic Fileds で設定できるフィールドには related type というのがある。<br />
Magic Fields で作成したライトパネルまたは投稿タイプを指定しておくと、指定した括りの投稿がプルダウンで表示されるので、その中から選択した投稿のIDがカスタムフィールド値として保存される。*カテゴリーごとにライトパネルを作成すればカテゴリー別にできる。</p>
<p>投稿Aの作成時に投稿Bを選択すると、投稿Aでは選択した投稿として投稿Bを表示でき、</p>
<pre class="brush: php; ">
&lt;?php
$pID = get(&#039;related_type&#039;);
	$args = array(
		&#039;p&#039; =&gt; $pID,
	);
	query_posts($args);
?&gt;
</pre>
<p>投稿Bでは投稿Bを選択した投稿を表示できる。</p>
<pre class="brush: php; ">
&lt;?php
$pvalue = get_the_ID();
	$args = array(
		&#039;meta_key&#039; =&gt; related_type,
		&#039;meta_value&#039; =&gt; $pvalue,
	);
	query_posts($args);
?&gt;
</pre>
<p>前者の場合で、フィールドを複製して複数の値を取る場合は</p>
<pre class="brush: php; ">
&lt;?php
$related = get_post_meta($post-&gt;ID, &#039;related&#039;, false);
$args = array(
    &#039;post__in&#039; =&gt; $related
	);
	query_posts($args);
?&gt;
</pre>
<p>複数のキーから複数の値を取る場合は</p>
<pre class="brush: php; ">
&lt;?php
$related1 = get_post_meta($post-&gt;ID, &#039;related1&#039;, false);
$related2 = get_post_meta($post-&gt;ID, &#039;related2&#039;, false);
$related = array_merge_recursive($related1, $related2);
$args = array(
    &#039;post__in&#039; =&gt; $related
	);
	query_posts($args);
?&gt;
</pre>
<p>関連記事やレビュー、その他いろいろな紐付けに利用できる。</p>
<div id="seo_alrp_related"><h2>Magic Fields の使い方 related type の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/magic-fields.html" rel="bookmark">Magic Fields で投稿テンプレート</a></h3><p>カスタムフィールドプラグインMagic Fields は write panel を作成すると、↓のようにそれぞれの名前で新規投稿と編集画面が出来る。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120302.html" rel="bookmark">Magic Fields の使い方 タグ編</a></h3><p>Magic Fields で設定したカスタムフィールドの値をテーマで表示するには [sourcecode language='php'][/sourcecode] テキストフィールド、ラジオボタン、プルダウンはこれで表示できる。チェックボックスリストの場合は ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/120331.html" rel="bookmark">Magic Fields の使い方 タグ編 複製</a></h3><p>フィールドの複製 [sourcecode language='php'][/sourcecode] イメージフィールドの複製 [sourcecode language='php'][/sourcecode] ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/blog/101229.html" rel="bookmark">Magic Fields 1.5.2</a></h3><p>Magic Fields 1.5.2 で変わったところ。 有効化したとき、ファイル用のディレクトリを作れと言われなくなった。*ヘテムルの場合 フィールドをグループ分けするとグループ毎に開閉できるので項目が多くても編集画面がコンパクトになる。 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-plugin/custum-field.html" rel="bookmark">カスタムフィールド</a></h3><p>投稿欄に任意のカスタムフィールドを付けるプラグイン Custom Field GUI Utility：http://www.tinybeans.net/blog/download/wp-plugin/cfg-utility-100.html 2010.2.9追記 ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/works/120324.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>いけません、と思うこと</title>
		<link>http://web-taiyo.com/blog/120308.html</link>
		<comments>http://web-taiyo.com/blog/120308.html#comments</comments>
		<pubDate>Thu, 08 Mar 2012 10:14:00 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=2954</guid>
		<description><![CDATA[何でも「カワイイ」で片付けてはいけません。 「わからない」で押し通そうとしてはいけません。 「覚えられない」ことは記録しておかなくてはいけません。 「わからなく」ならないように整理しておかなくてはいけません。 「自分の手間」を惜しんではいけません。 「他人の時間」は大切にしなくてはいけません。 「誤字・脱字」を放っておいてはいけません。 「会社のHPに併設したブログ」に小学生の日記みたいな文章を書 ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>何でも「カワイイ」で片付けてはいけません。<br />
「わからない」で押し通そうとしてはいけません。<br />
「覚えられない」ことは記録しておかなくてはいけません。<br />
「わからなく」ならないように整理しておかなくてはいけません。<br />
「自分の手間」を惜しんではいけません。<br />
「他人の時間」は大切にしなくてはいけません。<br />
「誤字・脱字」を放っておいてはいけません。<br />
「会社のHPに併設したブログ」に小学生の日記みたいな文章を書いてはいけません。</p>
<p>なんてことを思ったら、自分も顧みなくてはいけません。</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/blog/120308.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>カスタム投稿をカレンダーに表示</title>
		<link>http://web-taiyo.com/blog/120305.html</link>
		<comments>http://web-taiyo.com/blog/120305.html#comments</comments>
		<pubDate>Mon, 05 Mar 2012 11:53:09 +0000</pubDate>
		<dc:creator>Taiyo Blog</dc:creator>
				<category><![CDATA[web制作メモおよび独り言]]></category>

		<guid isPermaLink="false">http://web-taiyo.com/?p=2950</guid>
		<description><![CDATA[カスタム投稿をカレンダーに表示するウィジェットのプラグインを使ってみたら、リンクにカスタム投稿名が入らないので、以前、特定のカテゴリーをカレンダーに表示する際に使用したコードを書き換えてみた。 functions function widget_customCalendar($args) { extract($args); echo $before_widget; echo get_calenda ...]]></description>
			<content:encoded><![CDATA[<div class='wp_fbl_top' style='text-align:'></div><p>カスタム投稿をカレンダーに表示するウィジェットのプラグインを使ってみたら、リンクにカスタム投稿名が入らないので、以前、特定のカテゴリーをカレンダーに表示する際に使用したコードを書き換えてみた。</p>
<p>functions</p>
<pre class="brush: php; ">
function widget_customCalendar($args) {
	extract($args);
	echo $before_widget;
	echo get_calendar_custom(カスタム投稿名);
	echo $after_widget;
}

if ( function_exists(&#039;register_sidebar_widget&#039;) ) {
	register_sidebar_widget(&#039;Customized Calendar&#039;, &#039;widget_customCalendar&#039;);
}

function get_calendar_custom($posttype,$initial = true) {
	global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;

	$key = md5( $m . $monthnum . $year );
	if ( $cache = wp_cache_get( &#039;get_calendar_custom&#039;, &#039;calendar_custom&#039; ) ) {
		if ( isset( $cache[ $key ] ) ) {
			echo $cache[ $key ];
			return;
		}
	}

	ob_start();
	// Quick check. If we have no posts at all, abort!
	if ( !$posts ) {
		$gotsome = $wpdb-&gt;get_var(&quot;SELECT ID from $wpdb-&gt;posts WHERE post_type = &#039;post&#039; AND post_status = &#039;publish&#039; ORDER BY post_date DESC LIMIT 1&quot;);
		if ( !$gotsome )
			return;
	}

	if ( isset($_GET[&#039;w&#039;]) )
		$w = &#039;&#039;.intval($_GET[&#039;w&#039;]);

	// week_begins = 0 stands for Sunday
	$week_begins = intval(get_option(&#039;start_of_week&#039;));

	// Let&#039;s figure out when we are
	if ( !empty($monthnum) &amp;&amp; !empty($year) ) {
		$thismonth = &#039;&#039;.zeroise(intval($monthnum), 2);
		$thisyear = &#039;&#039;.intval($year);
	} elseif ( !empty($w) ) {
		// We need to get the month from MySQL
		$thisyear = &#039;&#039;.intval(substr($m, 0, 4));
		$d = (($w - 1) * 7) + 6; //it seems MySQL&#039;s weeks disagree with PHP&#039;s
		$thismonth = $wpdb-&gt;get_var(&quot;SELECT DATE_FORMAT((DATE_ADD(&#039;${thisyear}0101&#039;, INTERVAL $d DAY) ), &#039;%m&#039;)&quot;);
	} elseif ( !empty($m) ) {
		$thisyear = &#039;&#039;.intval(substr($m, 0, 4));
		if ( strlen($m) &lt; 6 )
				$thismonth = &#039;01&#039;;
		else
				$thismonth = &#039;&#039;.zeroise(intval(substr($m, 4, 2)), 2);
	} else {
		$thisyear = gmdate(&#039;Y&#039;, current_time(&#039;timestamp&#039;));
		$thismonth = gmdate(&#039;m&#039;, current_time(&#039;timestamp&#039;));
	}

	$unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);

	// Get the next and previous month and year with at least one post
	$previous = $wpdb-&gt;get_row(&quot;SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
		FROM $wpdb-&gt;posts
		LEFT JOIN $wpdb-&gt;term_relationships ON($wpdb-&gt;posts.ID = $wpdb-&gt;term_relationships.object_id)
		LEFT JOIN $wpdb-&gt;term_taxonomy ON($wpdb-&gt;term_relationships.term_taxonomy_id = $wpdb-&gt;term_taxonomy.term_taxonomy_id) 

		WHERE post_date &lt; &#039;$thisyear-$thismonth-01&#039;

		AND post_type = &#039;$posttype&#039; AND post_status = &#039;publish&#039;
			ORDER BY post_date DESC
			LIMIT 1&quot;);

	$next = $wpdb-&gt;get_row(&quot;SELECT	DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
		FROM $wpdb-&gt;posts
		LEFT JOIN $wpdb-&gt;term_relationships ON($wpdb-&gt;posts.ID = $wpdb-&gt;term_relationships.object_id)
		LEFT JOIN $wpdb-&gt;term_taxonomy ON($wpdb-&gt;term_relationships.term_taxonomy_id = $wpdb-&gt;term_taxonomy.term_taxonomy_id)

		WHERE post_date &gt;	&#039;$thisyear-$thismonth-01&#039;

		AND MONTH( post_date ) != MONTH( &#039;$thisyear-$thismonth-01&#039; )
		AND post_type = &#039;$posttype&#039; AND post_status = &#039;publish&#039;
			ORDER	BY post_date ASC
			LIMIT 1&quot;);

	echo &#039;&lt;div id=&quot;calendar_wrap&quot;&gt;
	&lt;table id=&quot;wp-calendar&quot; summary=&quot;&#039; . __(&#039;Calendar&#039;) . &#039;&quot;&gt;
	&lt;caption&gt;&#039; . sprintf(_c(&#039;%1$s %2$s|Used as a calendar caption&#039;), $wp_locale-&gt;get_month($thismonth), date(&#039;Y&#039;, $unixmonth)) . &#039;&lt;/caption&gt;
	&lt;thead&gt;
	&lt;tr&gt;&#039;;

	$myweek = array();

	for ( $wdcount=0; $wdcount&lt;=6; $wdcount++ ) {
		$myweek[] = $wp_locale-&gt;get_weekday(($wdcount+$week_begins)%7);
	}

	foreach ( $myweek as $wd ) {
		$day_name = (true == $initial) ? $wp_locale-&gt;get_weekday_initial($wd) : $wp_locale-&gt;get_weekday_abbrev($wd);
		echo &quot;\n\t\t&lt;th abbr=\&quot;$wd\&quot; scope=\&quot;col\&quot; title=\&quot;$wd\&quot;&gt;$day_name&lt;/th&gt;&quot;;
	}

	echo &#039;
	&lt;/tr&gt;
	&lt;/thead&gt;

	&lt;tfoot&gt;
	&lt;tr&gt;&#039;;

	if ( $previous ) {
		echo &quot;\n\t\t&quot;.&#039;&lt;td abbr=&quot;&#039; . $wp_locale-&gt;get_month($previous-&gt;month) . &#039;&quot; colspan=&quot;3&quot; id=&quot;prev&quot;&gt;&lt;a href=&quot;&#039; .  $home_url . &#039;/&#039; . $posttype .  &#039;/date/&#039; . $previous-&gt;year . &#039;/&#039; . $previous-&gt;month . &#039;&quot; title=&quot;&#039; . sprintf(__(&#039;View posts for %1$s %2$s&#039;), $wp_locale-&gt;get_month($previous-&gt;month),			date(&#039;Y&#039;, mktime(0, 0 , 0, $previous-&gt;month, 1, $previous-&gt;year))) . &#039;&quot;&gt;&amp;laquo; &#039; . $wp_locale-&gt;get_month_abbrev($wp_locale-&gt;get_month($previous-&gt;month)) . &#039;&lt;/a&gt;&lt;/td&gt;&#039;;
	} else {
		echo &quot;\n\t\t&quot;.&#039;&lt;td colspan=&quot;3&quot; id=&quot;prev&quot; class=&quot;pad&quot;&gt;&amp;nbsp;&lt;/td&gt;&#039;;
	}

	echo &quot;\n\t\t&quot;.&#039;&lt;td class=&quot;pad&quot;&gt;&amp;nbsp;&lt;/td&gt;&#039;;

	if ( $next ) {
		echo &quot;\n\t\t&quot;.&#039;&lt;td abbr=&quot;&#039; . $wp_locale-&gt;get_month($next-&gt;month) . &#039;&quot; colspan=&quot;3&quot; id=&quot;next&quot;&gt;&lt;a href=&quot;&#039; .  $home_url . &#039;/&#039; . $posttype .  &#039;/date/&#039; . $next-&gt;year . &#039;/&#039; . $next-&gt;month . &#039;&quot; title=&quot;&#039; . sprintf(__(&#039;View posts for %1$s %2$s&#039;), $wp_locale-&gt;get_month($next-&gt;month),			date(&#039;Y&#039;, mktime(0, 0 , 0, $next-&gt;month, 1, $next-&gt;year))) . &#039;&quot;&gt;&#039; . $wp_locale-&gt;get_month_abbrev($wp_locale-&gt;get_month($next-&gt;month)) . &#039; &amp;raquo;&lt;/a&gt;&lt;/td&gt;&#039;;
	} else {
		echo &quot;\n\t\t&quot;.&#039;&lt;td colspan=&quot;3&quot; id=&quot;next&quot; class=&quot;pad&quot;&gt;&amp;nbsp;&lt;/td&gt;&#039;;
	}

	echo &#039;
	&lt;/tr&gt;
	&lt;/tfoot&gt;
	&lt;tbody&gt;
	&lt;tr&gt;&#039;;

	// Get days with posts
	$dyp_sql = &quot;SELECT DISTINCT DAYOFMONTH(post_date)
		FROM $wpdb-&gt;posts 

		LEFT JOIN $wpdb-&gt;term_relationships ON($wpdb-&gt;posts.ID = $wpdb-&gt;term_relationships.object_id)
		LEFT JOIN $wpdb-&gt;term_taxonomy ON($wpdb-&gt;term_relationships.term_taxonomy_id = $wpdb-&gt;term_taxonomy.term_taxonomy_id) 

		WHERE MONTH(post_date) = &#039;$thismonth&#039; 

		AND YEAR(post_date) = &#039;$thisyear&#039;
		AND post_type = &#039;$posttype&#039; AND post_status = &#039;publish&#039;
		AND post_date &lt; &#039;&quot; . current_time(&#039;mysql&#039;) . &quot;&#039;&quot;;

	$dayswithposts = $wpdb-&gt;get_results($dyp_sql, ARRAY_N);

	if ( $dayswithposts ) {
		foreach ( (array) $dayswithposts as $daywith ) {
			$daywithpost[] = $daywith[0];
		}
	} else {
		$daywithpost = array();
	}

	if (strpos($_SERVER[&#039;HTTP_USER_AGENT&#039;], &#039;MSIE&#039;) !== false || strpos(strtolower($_SERVER[&#039;HTTP_USER_AGENT&#039;]), &#039;camino&#039;) !== false || strpos(strtolower($_SERVER[&#039;HTTP_USER_AGENT&#039;]), &#039;safari&#039;) !== false)
		$ak_title_separator = &quot;\n&quot;;
	else
		$ak_title_separator = &#039;, &#039;;

	$ak_titles_for_day = array();
	$ak_post_titles = $wpdb-&gt;get_results(&quot;SELECT post_title, DAYOFMONTH(post_date) as dom &quot;
		.&quot;FROM $wpdb-&gt;posts &quot;

		.&quot;LEFT JOIN $wpdb-&gt;term_relationships ON($wpdb-&gt;posts.ID = $wpdb-&gt;term_relationships.object_id) &quot;
		.&quot;LEFT JOIN $wpdb-&gt;term_taxonomy ON($wpdb-&gt;term_relationships.term_taxonomy_id = $wpdb-&gt;term_taxonomy.term_taxonomy_id) &quot;

		.&quot;WHERE YEAR(post_date) = &#039;$thisyear&#039; &quot;

		.&quot;AND MONTH(post_date) = &#039;$thismonth&#039; &quot;
		.&quot;AND post_date &lt; &#039;&quot;.current_time(&#039;mysql&#039;).&quot;&#039; &quot;
		.&quot;AND post_type = &#039;$posttype&#039; AND post_status = &#039;publish&#039;&quot;
	);
	if ( $ak_post_titles ) {
		foreach ( (array) $ak_post_titles as $ak_post_title ) {

				$post_title = apply_filters( &quot;the_title&quot;, $ak_post_title-&gt;post_title );
				$post_title = str_replace(&#039;&quot;&#039;, &#039;&amp;quot;&#039;, wptexturize( $post_title ));

				if ( empty($ak_titles_for_day[&#039;day_&#039;.$ak_post_title-&gt;dom]) )
					$ak_titles_for_day[&#039;day_&#039;.$ak_post_title-&gt;dom] = &#039;&#039;;
				if ( empty($ak_titles_for_day[&quot;$ak_post_title-&gt;dom&quot;]) ) // first one
					$ak_titles_for_day[&quot;$ak_post_title-&gt;dom&quot;] = $post_title;
				else
					$ak_titles_for_day[&quot;$ak_post_title-&gt;dom&quot;] .= $ak_title_separator . $post_title;
		}
	}

	// See how much we should pad in the beginning
	$pad = calendar_week_mod(date(&#039;w&#039;, $unixmonth)-$week_begins);
	if ( 0 != $pad )
		echo &quot;\n\t\t&quot;.&#039;&lt;td colspan=&quot;&#039;.$pad.&#039;&quot; class=&quot;pad&quot;&gt;&amp;nbsp;&lt;/td&gt;&#039;;

	$daysinmonth = intval(date(&#039;t&#039;, $unixmonth));
	for ( $day = 1; $day &lt;= $daysinmonth; ++$day ) {
		if ( isset($newrow) &amp;&amp; $newrow )
			echo &quot;\n\t&lt;/tr&gt;\n\t&lt;tr&gt;\n\t\t&quot;;
		$newrow = false;

		if ( $day == gmdate(&#039;j&#039;, (time() + (get_option(&#039;gmt_offset&#039;) * 3600))) &amp;&amp; $thismonth == gmdate(&#039;m&#039;, time()+(get_option(&#039;gmt_offset&#039;) * 3600)) &amp;&amp; $thisyear == gmdate(&#039;Y&#039;, time()+(get_option(&#039;gmt_offset&#039;) * 3600)) )
			echo &#039;&lt;td id=&quot;today&quot;&gt;&#039;;
		else
			echo &#039;&lt;td&gt;&#039;;

		if ( in_array($day, $daywithpost) ) // any posts today?
				echo &#039;&lt;a href=&quot;&#039; .  $home_url . &#039;/&#039; . $posttype .  &#039;/date/&#039; . $thisyear . &#039;/&#039; . $thismonth . &#039;/&#039; . $day . &quot;&gt;$day&lt;/a&gt;&quot;;
		else
			echo $day;
		echo &#039;&lt;/td&gt;&#039;;

		if ( 6 == calendar_week_mod(date(&#039;w&#039;, mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) )
			$newrow = true;
	}

	$pad = 7 - calendar_week_mod(date(&#039;w&#039;, mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
	if ( $pad != 0 &amp;&amp; $pad != 7 )
		echo &quot;\n\t\t&quot;.&#039;&lt;td class=&quot;pad&quot; colspan=&quot;&#039;.$pad.&#039;&quot;&gt;&amp;nbsp;&lt;/td&gt;&#039;;

	echo &quot;\n\t&lt;/tr&gt;\n\t&lt;/tbody&gt;\n\t&lt;/table&gt;&lt;/div&gt;&quot;;

	$output = ob_get_contents();
	ob_end_clean();
	echo $output;
	$cache[ $key ] = $output;
	wp_cache_set( &#039;get_calendar_custom&#039;, $cache, &#039;calendar_custom&#039; );
}
</pre>
<p>表示</p>
<pre class="brush: php; ">
&lt;?php echo get_calendar_custom(&#039;カスタム投稿名&#039;); ?&gt;
</pre>
<p>多分、Custom Post Type Permalinksでのパーマリンク設定が必要です。</p>
<div id="seo_alrp_related"><h2>カスタム投稿をカレンダーに表示 の関連記事</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/110706.html" rel="bookmark">カレンダー、日別アーカイブを特定のカテゴリーで</a></h3><p>カレンダーに特定のカテゴリーのみを表示し、日別アーカイブでもそのカテゴリーのみを表示する。 カレンダーのコードはhttp://wordpress.org/support/topic/edit-get_calendar-function-to-allow-show-posts-from-specific-category?replies=11参照 functions.php [sourcecode language='php'] function ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-plugin/category_archive.html" rel="bookmark">アーカイブから特定のカテゴリーを除外</a></h3><p>トップページやアーカイブで特定のカテゴリーを除外するプラグイン：Advanced Category Excluder http://wordpress.org/extend/plugins/advanced-category-excluder/ *3.0.2 で動作確認 ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/111007.html" rel="bookmark">アーカイブなどでquery_posts</a></h3><p>例えばカスタムフィールドに入力した値順に投稿をソートしたい、かつ多くのカテゴリーで（子カテゴリーが多いなど）、という場合 [sourcecode language='php'] [/sourcecode] 年月アーカイブを特定のカテゴリーで [sourcecode ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/works/120214.html" rel="bookmark">Magic Fields 覚書4</a></h3><p>申し込みのためのテキストと申込書へのリンクが対象者別に複数あるので、フィールドグループ「申し込み」を複製可とし、別に「締め切り」チェックボックスを作成。 申込書へのリンク部分は申込書のアップロードがある場合のみ表示、「締め切り」にチェックを入れると全て非表示。 [sourcecode language='php']</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://web-taiyo.com/wordpress-theme/conditional_tags.html" rel="bookmark">コンディショナルタグの書き方</a></h3><p>例えばトップページとカテゴリーページでサイドバーの表示を変えたい場合など、コンディショナルタグで振り分けることが出来る。 トップページのみ「AAA」を表示する、なら [sourcecode language='php'] AAA [/sourcecode] ...</p></div></li></ul></div><div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://web-taiyo.com/blog/120305.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

