{"id":201770,"date":"2015-06-19T10:47:35","date_gmt":"2015-06-19T01:47:35","guid":{"rendered":""},"modified":"2016-07-30T21:15:00","modified_gmt":"2016-07-30T21:15:00","slug":"%e3%82%a2%e3%83%bc%e3%82%ab%e3%82%a4%e3%83%96%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%a7%e3%82%bf%e3%82%af%e3%82%bd%e3%83%8e%e3%83%9f%e3%83%bc%e6%af%8e%e3%81%ab%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90%e3%81%95","status":"closed","type":"topic","link":"https:\/\/ja.wordpress.org\/support\/topic\/%e3%82%a2%e3%83%bc%e3%82%ab%e3%82%a4%e3%83%96%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%a7%e3%82%bf%e3%82%af%e3%82%bd%e3%83%8e%e3%83%9f%e3%83%bc%e6%af%8e%e3%81%ab%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90%e3%81%95\/","title":{"rendered":"\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u6bce\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u6761\u4ef6\u5206\u5c90\u3055\u305b\u8868\u793a\u3055\u305b\u305f\u3044"},"content":{"rendered":"<p>PHP\u521d\u5fc3\u8005\u3067\u3059\u3002<br \/>\n\u30b5\u30fc\u30d3\u30b9\u306e\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u3092\u4f5c\u6210\u3002\u30bf\u30af\u30bd\u30ce\u30df\u30fcA,B,C,D\u304c\u3042\u308b\u72b6\u614b\u3067\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u306b\u5404\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u6bce\u306b\u753b\u50cf\u3068\u30bf\u30a4\u30c8\u30eb\u3092\u914d\u7f6e\u3002<br \/>\n\u305d\u306e\u4e0b\u306b\u5404\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u6bce\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u6761\u4ef6\u5206\u5c90\u3055\u305b\u8868\u793a\u3055\u305b\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u753b\u50cf\u3068\u30bf\u30a4\u30c8\u30eb\u90e8\u5206\u306f\u3046\u307e\u304f\u3044\u3063\u305f\u3082\u306e\u306e\u3001\u4e0b\u8a18\u3067\u306f\u3059\u3079\u3066\u306e\u30c6\u30ad\u30b9\u30c8\u304c\u3059\u3079\u3066\u306e\u753b\u50cf\u3068\u30bf\u30a4\u30c8\u30eb\u4e0b\u90e8\u306b\u8868\u793a\u3055\u308c\u308b\u72b6\u614b\u3067\u3059\u3002<\/p>\n<pre><code>&lt;?php\n            $loop = new WP_Query( array( &#039;post_type&#039; =&gt; &#039;service&#039;, &#039;posts_per_page&#039; =&gt; 10 ) );\n\n            if($loop-&gt;have_posts()) : \/\/ \u8a72\u5f53\u3059\u308b\u6295\u7a3f\u304c\u3042\u308b\u5834\u5408\n            ?&gt;\n                &lt;dl&gt;\n                &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); \/\/ \u30eb\u30fc\u30d7\u958b\u59cb ?&gt;\n\n                    &lt;dt&gt;\n\t\t\t\t\t\t&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;\n\t\t\t\t\t\t&lt;?php \/\/ \u30ab\u30b9\u30bf\u30e0\u30bf\u30af\u30bd\u30ce\u30df\u30fc &#039;service-cat&#039; \u306e\u51e6\u7406\n                        $terms = get_the_terms( get_the_ID(), &#039;service-cat&#039; ); \/\/ \u6295\u7a3f\u306b\u7d10\u3065\u3051\u3089\u308c\u305f &#039;service-cat&#039; \u306e\u30bf\u30fc\u30e0\u3092\u3059\u3079\u3066\u53d6\u5f97\n                        $term = $terms[0];\n                        $img = &#039;&lt;img src=&quot;&#039; . get_bloginfo(&#039;template_url&#039;). &#039;\/img\/icn_&#039;\n                              . $term-&gt;slug . &#039;.png&quot; alt=&quot;&#039; . $term-&gt;name . &#039;&quot; \/&gt;&#039;;\n                        ?&gt;\n                        &lt;?php echo $img; ?&gt;\n                        &lt;h4&gt;&lt;?php the_title(); ?&gt;&lt;\/h4&gt;&lt;\/a&gt;\n                    &lt;\/dt&gt;\n                    &lt;dd&gt;\n                    \t&lt;?php is_tax( &#039;a&#039; ); ?&gt;\n                        &lt;p&gt;\u30bf\u30af\u30bd\u30ce\u30df\u30fcA\u306e\u5834\u5408\u8868\u793a&lt;\/p&gt;\n                        &lt;?php is_tax( &#039;b&#039; ); ?&gt;\n                        &lt;p&gt;\u30bf\u30af\u30bd\u30ce\u30df\u30fcB\u306e\u5834\u5408\u8868\u793a&lt;\/p&gt;\n                        &lt;?php is_tax( &#039;c&#039; ); ?&gt;\n                        &lt;p&gt;\u30bf\u30af\u30bd\u30ce\u30df\u30fcC\u306e\u5834\u5408\u8868\u793a&lt;\/p&gt;\n                        &lt;?php is_tax( &#039;d&#039; ); ?&gt;\n                        &lt;p&gt;\u30bf\u30af\u30bd\u30ce\u30df\u30fcD\u306e\u5834\u5408\u8868\u793a&lt;\/p&gt;\n                    &lt;\/dd&gt;\n                &lt;?php endwhile; \/\/ \u30eb\u30fc\u30d7\u7d42\u308f\u308a ?&gt;\n                &lt;\/dl&gt;\n            &lt;?php else: \/\/ \u8a72\u5f53\u3059\u308b\u6295\u7a3f\u304c\u7121\u3044\u5834\u5408 ?&gt;\n            &lt;p&gt;\u8a72\u5f53\u3059\u308b\u6295\u7a3f\u306f\u3042\u308a\u307e\u305b\u3093&lt;\/p&gt;\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>\u8272\u3005\u8abf\u3079\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3001\u8a72\u5f53\u3059\u308b\u3082\u306e\u304c\u898b\u4ed8\u3051\u3089\u308c\u305a\u3001\u3053\u3061\u3089\u3067\u8cea\u554f\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3054\u6559\u6388\u306e\u307b\u3069\u3069\u3046\u304b\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u7533\u3057\u4e0a\u3052\u307e\u3059\u3002<\/p>\n","protected":false},"template":"","class_list":["post-201770","topic","type-topic","status-closed","hentry","topic-tag-14401","topic-tag-15782","topic-tag-15089"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/201770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/201770\/revisions"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=201770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}