{"id":2452,"date":"2016-09-29T11:39:45","date_gmt":"2016-09-29T02:39:45","guid":{"rendered":"http:\/\/tcd-manual.net\/?p=2452"},"modified":"2021-02-26T21:59:33","modified_gmt":"2021-02-26T12:59:33","slug":"%e8%a8%98%e4%ba%8b%e3%82%a2%e3%82%a4%e3%82%ad%e3%83%a3%e3%83%83%e3%83%81%e3%82%92%e9%9d%9e%e8%a1%a8%e7%a4%ba%e3%81%ab%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=2452","title":{"rendered":"TCD\u30c6\u30fc\u30deCORE\uff1a\u8a18\u4e8b\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1\u3092\u975e\u8868\u793a\u306b\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<h4 class=\"style_headline2\"><span>Q.<\/span>\u8a18\u4e8b\u306e\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1\u3092\u975e\u8868\u793a\u306b\u3057\u305f\u3044<\/h4>\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>\u7de8\u96c6\u3059\u308b\u30c6\u30fc\u30de\u30d5\u30a1\u30a4\u30eb\uff1aindex.php\u306a\u3069<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n &lt;div id=&quot;index_post_list1&quot; class=&quot;index_post_list clearfix&quot;&gt;\r\n  &lt;?php\r\n       $args = array('post_type' =&gt; 'post', 'ignore_sticky_posts' =&gt; 1, 'posts_per_page' =&gt; 5, 'category'=&gt;$options&#x5B;'index_category1']);\r\n       $index_post_list1 = get_posts($args);\r\n       if ($index_post_list1) {\r\n         $i = 1;\r\n         foreach ($index_post_list1 as $post) : setup_postdata ($post);\r\n  ?&gt;\r\n  &lt;div class=&quot;post_type&lt;?php if($i ==1) { echo '1'; } else { echo '2'; }; ?&gt; clearfix&lt;?php if (!has_post_thumbnail()) { echo ' no_thumbnail'; }; ?&gt;&quot;&gt;\r\n   &lt;a class=&quot;image&quot; href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;\r\n    &lt;?php if ( has_post_thumbnail()) { ?&gt;\r\n      &lt;?php if($i == 1) { the_post_thumbnail('size4'); } else { if(is_mobile()){the_post_thumbnail('size4');}else{the_post_thumbnail('size5');}; }; ?&gt;\r\n     &lt;?php } else { ?&gt;\r\n      &lt;?php echo '&lt;img src=&quot;'; bloginfo('template_url'); echo '\/img\/common\/no_image'; if($i ==1) { echo '4'; } else { echo '5'; }; echo '.gif&quot; alt=&quot;&quot; title=&quot;&quot; \/&gt;'; ?&gt;\r\n    &lt;?php }; ?&gt;\r\n   &lt;\/a&gt;\r\n   &lt;h3 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;\/h3&gt;\r\n   &lt;?php if($i ==1) { ?&gt;&lt;p class=&quot;excerpt&quot;&gt;&lt;?php if (has_excerpt()) { the_excerpt(); } else { new_excerpt(120); }; ?&gt;&lt;\/p&gt;&lt;?php }; ?&gt;\r\n   &lt;?php if ($options&#x5B;'show_date'] &amp;&amp; $options&#x5B;'show_category']) { ?&gt;\r\n   &lt;ul class=&quot;meta clearfix&quot;&gt;\r\n    &lt;?php if ($options&#x5B;'show_date']){ ?&gt;&lt;li class=&quot;post_date&quot;&gt;&lt;time class=&quot;entry-date updated&quot; datetime=&quot;&lt;?php the_modified_time('c'); ?&gt;&quot;&gt;&lt;?php the_time('Y\/n\/j'); ?&gt;&lt;\/time&gt;&lt;\/li&gt;&lt;?php }; ?&gt;\r\n    &lt;?php if ($options&#x5B;'show_category']){ ?&gt;&lt;li class=&quot;post_category&quot;&gt;&lt;?php the_category(', '); ?&gt;&lt;\/li&gt;&lt;?php }; ?&gt;\r\n   &lt;\/ul&gt;\r\n   &lt;?php }; ?&gt;\r\n  &lt;\/div&gt;\r\n  &lt;?php $i++; endforeach; wp_reset_query(); }; ?&gt;\r\n &lt;\/div&gt;&lt;!-- #index_post_list1 --&gt;\r\n<\/pre>\n<p>\u4e0b\u8a18\u30b3\u30fc\u30c9\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n   &lt;a class=&quot;image&quot; href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;\r\n    &lt;?php if ( has_post_thumbnail()) { ?&gt;\r\n      &lt;?php if($i == 1) { the_post_thumbnail('size4'); } else { if(is_mobile()){the_post_thumbnail('size4');}else{the_post_thumbnail('size5');}; }; ?&gt;\r\n     &lt;?php } else { ?&gt;\r\n      &lt;?php echo '&lt;img src=&quot;'; bloginfo('template_url'); echo '\/img\/common\/no_image'; if($i ==1) { echo '4'; } else { echo '5'; }; echo '.gif&quot; alt=&quot;&quot; title=&quot;&quot; \/&gt;'; ?&gt;\r\n    &lt;?php }; ?&gt;\r\n   &lt;\/a&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Q.\u8a18\u4e8b\u306e\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1\u3092\u975e\u8868\u793a\u306b\u3057\u305f\u3044 A.\u4e0b\u8a18\u306ephp\u30d5\u30a1\u30a4\u30eb\u306e\u8a72\u5f53\u7b87\u6240\u3092\u7de8\u96c6\u3057\u307e\u3059 \u7de8\u96c6\u3059\u308b\u30c6\u30fc\u30de\u30d5\u30a1\u30a4\u30eb\uff1aindex.php\u306a\u3069 &lt;div id=&quot;index_post_list1&quot; cl [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-2452","post","type-post","status-publish","format-standard","hentry","category-tcd027"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/2452","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=2452"}],"version-history":[{"count":0,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/2452\/revisions"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}