{"id":155,"date":"2016-01-14T15:00:40","date_gmt":"2016-01-14T06:00:40","guid":{"rendered":"http:\/\/tcd-manual.net\/?p=155"},"modified":"2021-04-30T21:29:36","modified_gmt":"2021-04-30T12:29:36","slug":"%e3%83%88%e3%83%83%e3%83%97%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ab%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%82%8b%e6%9c%80%e6%96%b0%e8%a8%98%e4%ba%8b%e3%81%ae%e8%a1%a8%e7%a4%ba%e8%a8%98%e4%ba%8b%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=155","title":{"rendered":"TCD\u30c6\u30fc\u30deAn\u3067\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u8868\u793a\u3055\u308c\u308b\u6700\u65b0\u8a18\u4e8b\u306e\u4ef6\u6570\u3092\u5909\u66f4\u3059\u308b"},"content":{"rendered":"<h4 class=\"style_headline2\"><span>Q.<\/span>\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u8868\u793a\u3055\u308c\u308b\u6700\u65b0\u8a18\u4e8b\u306e\u8868\u793a\u8a18\u4e8b\u4ef6\u6570\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\uff1f<\/h4>\n<p>\u7ba1\u7406\u753b\u9762\u306e\u8a2d\u5b9a\uff1e\u8868\u793a\u8a2d\u5b9a\u306b\u3042\u308b\u300c1\u30da\u30fc\u30b8\u306b\u8868\u793a\u3059\u308b\u6700\u5927\u6295\u7a3f\u6570\u300d\u3092\u5909\u66f4\u3057\u3066\u3082\u9069\u7528\u304c\u3055\u308c\u307e\u305b\u3093\u3002\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u6700\u65b0\u8a18\u4e8b\u306e\u8868\u793a\u4ef6\u6570\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 class=\"style_headline2\"><span>A.<\/span>\u4e0b\u8a18\u306ephp\u30d5\u30a1\u30a4\u30eb\u306e\u8a72\u5f53\u7b87\u6240\u3092\u7de8\u96c6\u3057\u307e\u3059<\/h4>\n<p>\u30c6\u30fc\u30de\u306b\u3088\u3063\u3066\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u8868\u793a\u3059\u308b\u6700\u65b0\u8a18\u4e8b\u306e\u4ef6\u6570\u3092\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5185\u306b\u6307\u5b9a\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u8868\u793a\u8a2d\u5b9a\u3067\u6700\u5927\u6295\u7a3f\u6570\u3092\u5909\u66f4\u3057\u3066\u3082\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u8868\u793a\u6295\u7a3f\u6570\u304c\u512a\u5148\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u4e0b\u8a18\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u8a72\u5f53\u7b87\u6240\u3092\u3054\u7de8\u96c6\u304f\u3060\u3055\u3044\u3002<br \/>\n<b>\u7de8\u96c6\u3059\u308b\u30d5\u30a1\u30a4\u30eb\uff1a<\/b>index.php<br \/>\n<b>\u7de8\u96c6\u3059\u308b\u7b87\u6240\uff1a<\/b><\/p>\n<pre class=\"brush: php; highlight: [6]; title: ; notranslate\" title=\"\">&lt;!-- recent post --&gt;\r\n  &lt;div id=&quot;index_post_list&quot;&gt;\r\n   &lt;h3 class=&quot;headline1&quot;&gt;&lt;?php _e('Recent post', 'tcd-w');  ?&gt;&lt;\/h3&gt;\r\n   &lt;ol class=&quot;first_list clearfix&quot;&gt;\r\n    &lt;?php\r\n        $args = array('post_type' =&gt; 'post', 'numberposts' =&gt; 10);\r\n        $index_post=get_posts($args);\r\n    ?&gt;<\/pre>\n<p>\u203b\u4e0a\u8a18\u30b3\u30fc\u30c9\u306e\u30cf\u30a4\u30e9\u30a4\u30c8\u90e8\u5206\u300cnumberposts\u300d\u306e\u6570\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u306f\u30b5\u30e0\u30cd\u30a4\u30eb\u4ed8\u304d\u8a18\u4e8b\u304c6\u4ef6\u3001\u30bf\u30a4\u30c8\u30eb\u306e\u307f\u306e\u8a18\u4e8b\u304c4\u4ef6\u306e\u5408\u8a0810\u4ef6\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001<br \/>\n\u4f8b\u3048\u3070\u3053\u308c\u3092\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u3064\u304d\u8a18\u4e8b\u304c9\u4ef6\u3001\u30bf\u30a4\u30c8\u30eb\u306e\u307f\u306e\u8a18\u4e8b\u304c3\u4ef6\u3068\u5909\u66f4\u3059\u308b\u969b\u306f\u4e0a\u8a18\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067numberposts\uff08\u8868\u793a\u3055\u305b\u308b\u8a18\u4e8b\u306e\u7dcf\u6570\uff09\u309212\u306b\u8a2d\u5b9a\u3057\u3001\u30b5\u30e0\u30cd\u30a4\u30eb\u4ed8\u306e\u8a18\u4e8b\u6570\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p><b>\u7de8\u96c6\u3059\u308b\u30d5\u30a1\u30a4\u30eb\uff1a<\/b>index.php<br \/>\n<b>\u7de8\u96c6\u3059\u308b\u7b87\u6240\uff1a<\/b><\/p>\n<pre class=\"brush: php; highlight: [4,12]; title: ; notranslate\" title=\"\"> $i = 1; \r\n        if ($index_post) {\r\n         foreach ($index_post as $post) : setup_postdata ($post);\r\n         if($i &lt; 10) {\r\n    ?&gt;\r\n    &lt;li class=&quot;clearfix&quot;&gt;\r\n     &lt;a class=&quot;image&quot; href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php if ( has_post_thumbnail()) { echo the_post_thumbnail('small_size'); } else { echo '&lt;img src=&quot;'; bloginfo('template_url'); echo '\/img\/common\/no_image3.gif&quot; alt=&quot;&quot; title=&quot;&quot; \/&gt;'; }; ?&gt;&lt;\/a&gt;\r\n     &lt;?php if ($options&#x5B;'show_date']) { ?&gt;&lt;p class=&quot;date&quot;&gt;&lt;?php the_time('Y.n.j'); ?&gt;&lt;\/p&gt;&lt;?php }; ?&gt;\r\n     &lt;h4 class=&quot;title&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h4&gt;\r\n     &lt;div class=&quot;excerpt&quot;&gt;&lt;p&gt;&lt;?php if (has_excerpt()) { the_excerpt(); } else { new_excerpt(40);}; ?&gt;&lt;\/p&gt;&lt;\/div&gt;\r\n    &lt;\/li&gt;\r\n    &lt;?php } elseif($i==10) { ?&gt;<\/pre>\n<p>\u203b\u4e0a\u8a18\u30b3\u30fc\u30c9\u306e\u30cf\u30a4\u30e9\u30a4\u30c8\u90e8\u5206\u306e\u6570\u5024\u309210\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f7\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"Q.\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u8868\u793a\u3055\u308c\u308b\u6700\u65b0\u8a18\u4e8b\u306e\u8868\u793a\u8a18\u4e8b\u4ef6\u6570\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\uff1f \u7ba1\u7406\u753b\u9762\u306e\u8a2d\u5b9a\uff1e\u8868\u793a\u8a2d\u5b9a\u306b\u3042\u308b\u300c1\u30da\u30fc\u30b8\u306b\u8868\u793a\u3059\u308b\u6700\u5927\u6295\u7a3f\u6570\u300d\u3092\u5909\u66f4\u3057\u3066\u3082\u9069\u7528\u304c\u3055\u308c\u307e\u305b\u3093\u3002\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u6700\u65b0\u8a18\u4e8b\u306e\u8868\u793a\u4ef6\u6570\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u3092\u6559\u3048\u3066\u304f\u3060\u3055 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[66,822],"class_list":["post-155","post","type-post","status-publish","format-standard","hentry","category-tcd014","tag-top-page","tag-822"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=155"}],"version-history":[{"count":0,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}