{"id":132637,"date":"2010-10-25T23:09:41","date_gmt":"2010-10-25T14:09:41","guid":{"rendered":""},"modified":"2016-07-30T19:37:31","modified_gmt":"2016-07-30T19:37:31","slug":"%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e4%bd%bf%e3%82%8f%e3%81%9a%e3%81%abcategory%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%a7%e5%8d%98%e4%b8%80%e8%a8%98%e4%ba%8b%e3%81%ae%e6%8a%95%e7%a8%bf","status":"closed","type":"topic","link":"https:\/\/ja.wordpress.org\/support\/topic\/%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e4%bd%bf%e3%82%8f%e3%81%9a%e3%81%abcategory%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%a7%e5%8d%98%e4%b8%80%e8%a8%98%e4%ba%8b%e3%81%ae%e6%8a%95%e7%a8%bf\/","title":{"rendered":"\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u308f\u305a\u306bCategory\u30da\u30fc\u30b8\u3067\u5358\u4e00\u8a18\u4e8b\u306e\u6295\u7a3f\u5185\u306b\u3042\u308b\u5916\u90e8\u753b\u50cf\u306eUR"},"content":{"rendered":"<p>WordPress\u3092\u3054\u652f\u63f4\u3055\u308c\u3066\u3044\u308b\u7686\u69d8\u3002<br \/>\n\u304a\u4e16\u8a71\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6295\u7a3f\u8a18\u4e8b(single.php)\u306e\u4e2d\u306b\u8868\u793a\u3055\u305b\u3066\u3044\u308b\u5916\u90e8\u753b\u50cf(\u76f4\u30ea\u30f3\u30af\u5c02\u7528\u306e\u30d0\u30ca\u30fc\u7b49)\u3092\u3001category.php\u3084tag.php\u7b49\u3067\u3001\u4e00\u89a7\u8868\u793a\u3055\u305b\u308b\u969b\u306b\u3001\u753b\u50cf\u3092\u30b5\u30e0\u30cd\u30a4\u30eb\u5316\u3057\u3066\u30ea\u30f3\u30af\u3068\u30b7\u30f3\u30b0\u30eb\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u3068\u4e00\u7dd2\u306b\u30ea\u30b9\u30c8\u8868\u793a\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>https:\/\/ja.forums.wordpress.org\/topic\/3134?replies=12<br \/>\nhttps:\/\/ja.forums.wordpress.org\/topic\/4806?replies=10<br \/>\nhttps:\/\/codex.wordpress.org\/Function_Reference\/wp_get_attachment_image_src<br \/>\nhttps:\/\/ja.forums.wordpress.org\/topic\/4827?replies=5<\/p>\n<pre><code>&lt;?php foreach($posts as $post): setup_postdata($post); ?&gt;\n\n\t&lt;h3&gt;\n\t&lt;?php\n\t\t$dat = get_posts(&#039;post_type=attachment&amp;orderby=menu_order&amp;order=ASC&amp;numberposts=1&amp;post_parent=&#039;.get_the_ID());\n\t\tif (count($dat)&gt; 0) {\n\t\t$image = wp_get_attachment_image_src($dat[0]-&gt;ID);\n\t\t$desc = &#039;&lt;img src=&quot;&#039;.$image[0].&#039;&quot; width=&quot;100px&quot; height=&quot;100px&quot; alt=&quot;&quot; \/&gt;&lt;\/a&gt;&#039;;\n\t\t\/\/ \u8a18\u4e8b\u51fa\u529b\n\t\techo &#039;&lt;a href=&quot;&#039; . get_permalink() . &#039;&quot; title=&quot;&#039; . the_title(&#039;&#039;, &#039;&#039;, false) . &#039;&quot;&gt;&#039;;\n\t\techo $desc;} ?&gt;\n\n\t&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&amp;nbsp;::&amp;nbsp;&lt;?php the_time(&#039;Y\u5e74n\u6708&#039;); ?&gt;&lt;\/h3&gt;\n\n\t&lt;?php endforeach; ?&gt;<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30da\u30fc\u30b8\u304c\u771f\u3063\u767d\u306b\u306a\u3063\u305f\u308a\u3001HTML\u306b&lt;img&gt;\u30b3\u30fc\u30c9\u304c\u3046\u307e\u304f\u633f\u5165\u3067\u304d\u306a\u304b\u3063\u305f\u308a\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5358\u4e00\u8a18\u4e8b\u306b\u8cbc\u3063\u3066\u3044\u308b\u753b\u50cf\u306f\u3001WordPress\u306e\u7ba1\u7406\u753b\u9762\u306b\u3042\u308b\u300c\u30e1\u30c7\u30a3\u30a2\u300d\u304b\u3089\u767b\u9332\u3057\u305f\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u76f4\u30ea\u30f3\u30af\u5c02\u7528\u306e\u30d0\u30ca\u30fc\u3084\u3001\u5225\u30b5\u30fc\u30d0\u30fc\u306b\u3042\u308b\u753b\u50cf\u3092\u76f4\u63a5\u300c\u7d76\u5bfe\u30d1\u30b9\u300d\u5f62\u5f0f\u3067\u547c\u3073\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u308b\u3079\u304fCustom Field Template plugin\u306a\u3069\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u308f\u306a\u3044\u3067\u3001\u6295\u7a3f\u8a18\u4e8b\u5185\u306b\u3042\u308b\u5916\u90e8\u753b\u50cf\u306eURL\u3092\u53d6\u5f97\u3057\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u30da\u30fc\u30b8\u7b49\u3067\u30ea\u30b9\u30c8\u8868\u793a\u3055\u305b\u305f\u3044\u3068\u8003\u3048\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>loop-category.php\u3092\u65b0\u898f\u306b\u4f5c\u6210\u3057\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002(\u4e00\u90e8\u629c\u7c8b)<\/p>\n<pre><code>&lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;\n&lt;h3 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php printf( esc_attr__( &#039;Permalink to %s&#039;, &#039;twentyten&#039; ), the_title_attribute( &#039;echo=0&#039; ) ); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h3&gt;\n\n&lt;div class=&quot;thumbnail-image&quot;&gt;\n\n\u25cf\u25cf\u3053\u3053\u306b\u5916\u90e8URL\u306e\u753b\u50cf\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u8868\u793a\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\n\n&lt;\/div&gt;\n&lt;?php if ( is_archive() || is_search() ) : \/\/ Only display excerpts for archives and search. ?&gt;\n&lt;div class=&quot;entry-summary&quot;&gt;\n&lt;?php the_excerpt(); ?&gt;\n&lt;\/div&gt;&lt;!-- .entry-summary --&gt;\n&lt;?php else : ?&gt;\n&lt;div class=&quot;entry-content&quot;&gt;\n&lt;?php the_content( __( &#039;Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;\/span&gt;&#039;, &#039;twentyten&#039; ) ); ?&gt;\n&lt;?php wp_link_pages( array( &#039;before&#039; =&gt; &#039;&lt;div class=&quot;page-link&quot;&gt;&#039; . __( &#039;Pages:&#039;, &#039;twentyten&#039; ), &#039;after&#039; =&gt; &#039;&lt;\/div&gt;&#039; ) ); ?&gt;\n&lt;\/div&gt;&lt;!-- .entry-content --&gt;\n&lt;?php endif; ?&gt;\n\n&lt;div class=&quot;entry-utility&quot;&gt;\n&lt;?php if ( count( get_the_category() ) ) : ?&gt;\n\t\t\t\t\t\t\t&lt;p class=&quot;entry-content-category&quot;&gt;&lt;?php printf( __( &#039;Category :  %2$s&#039;, &#039;twentyten&#039; ), &#039;entry-utility-prep entry-utility-prep-cat-links&#039;, get_the_category_list( &#039;, &#039; ) ); ?&gt;\n&lt;\/p&gt;\t\t\t\t\t\t\t&lt;?php endif; ?&gt;\n&lt;?php\n\t\t\t\t\t$tags_list = get_the_tag_list( &#039;&#039;, &#039;, &#039; );\n\t\t\t\t\tif ( $tags_list ):\n\t\t\t\t?&gt;\n\t\t\t\t\t\t\t&lt;p class=&quot;entry-content-tag&quot;&gt;&lt;?php printf( __( &#039;Tag :  %2$s&#039;, &#039;twentyten&#039; ), &#039;entry-utility-prep entry-utility-prep-tag-links&#039;, $tags_list ); ?&gt;\n&lt;\/p&gt;\t\t\t\t\t\t\t&lt;div class=&quot;entry-meta&quot;&gt;\nDate : &lt;?php the_time(&#039;Y\/m\/d H:i:s&#039;, &#039;&#039;, &#039;&#039;); ?&gt;\n&lt;\/div&gt;&lt;!-- .entry-meta --&gt;\n\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>\u3069\u306a\u305f\u304b\u3001\u89e3\u6c7a\u7b56\u3092\u3054\u5b58\u3058\u3067\u3057\u305f\u3089\u3001\u3054\u4f1d\u6388\u9802\u3051\u307e\u3059\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n\u5fa1\u5fd9\u3057\u3044\u4e2d\u3001\u305f\u3044\u3078\u3093\u304a\u624b\u6570\u3067\u3059\u304c\u3001\u3069\u3046\u305e\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u7533\u3057\u4e0a\u3052\u307e\u3059\u3002<\/p>\n<p>\u30c6\u30fc\u30de\u306f\u3001 Twentyten\u3092\u4f7f\u7528\u3057\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\u30b5\u30fc\u30d0\u30fc\u306f\u3001\u3055\u304f\u3089\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3002<br \/>\nWordPress\u306f\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"template":"","class_list":["post-132637","topic","type-topic","status-closed","hentry","topic-tag-category-php","topic-tag-url","topic-tag-16958","topic-tag-14852","topic-tag-16959"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/132637","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\/132637\/revisions"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=132637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}