{"id":337,"date":"2016-01-29T15:43:34","date_gmt":"2016-01-29T06:43:34","guid":{"rendered":"http:\/\/tcd-manual.net\/?p=337"},"modified":"2021-04-30T21:01:25","modified_gmt":"2021-04-30T12:01:25","slug":"%e3%83%88%e3%83%83%e3%83%97%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e3%80%8c%e6%9c%80%e8%bf%91%e3%81%ae%e8%a8%98%e4%ba%8b%e3%80%8d%e3%80%8c%e3%81%8a%e3%81%99%e3%81%99%e3%82%81%e3%82%ab%e3%83%86%e3%82%b4","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=337","title":{"rendered":"TCD\u30c6\u30fc\u30deOpinion\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u8a18\u4e8b\u3092\u53e4\u3044\u9806\u3067\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5"},"content":{"rendered":"<h4 class=\"style_headline2\"><span>Q.<\/span>\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u300c\u6700\u8fd1\u306e\u8a18\u4e8b\u300d\u3092\u53e4\u3044\u9806\u306b\u8868\u793a\u3055\u305b\u305f\u3044<\/h4>\n<p>\u6700\u8fd1\u306e\u8a18\u4e8b\u3092\u53e4\u3044\u9806\u3067\u8868\u793a\u3055\u305b\u305f\u3044\u306e\u3067\u3059\u304c\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3059\u308c\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u304b\uff1f\u307e\u305f\u3001\u304a\u3059\u3059\u3081\u30ab\u30c6\u30b4\u30ea\u30fc1.2.3\u3092\u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001\u3053\u308c\u3089\u306b\u3082\u8a18\u4e8b\u304c\u53e4\u3044\u9806\u306b\u8868\u793a\u3055\u305b\u305f\u3044\u3067\u3059\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>\u2460\u6700\u8fd1\u306e\u8a18\u4e8b\u3092\u6607\u9806\u306b\u3059\u308b<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; title: ; notranslate\" title=\"\"> &lt;?php \/\/ Recent post\r\n---------------------------------------------------------------------------------------\r\n?&gt;\r\n  &lt;div id=&quot;index_recent_post&quot;&gt;\r\n   &lt;h3 class=&quot;headline1&quot;&gt;&lt;?php _e(&quot;Recent post&quot;,&quot;tcd-w&quot;);\r\n?&gt;&lt;span&gt;&lt;?php next_posts_link(__('Archives', 'tcd-w')) ?&gt;&lt;\/span&gt;&lt;\/h3&gt;\r\n   &lt;?php\r\n        $odd_or_even = 'odd';\r\n        $args = array('post_type' =&gt; 'post', 'posts_per_page' =&gt; 6);<\/pre>\n<p>\u2193<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\"> &lt;?php \/\/ Recent post\r\n---------------------------------------------------------------------------------------\r\n?&gt;\r\n  &lt;div id=&quot;index_recent_post&quot;&gt;\r\n   &lt;h3 class=&quot;headline1&quot;&gt;&lt;?php _e(&quot;Recent post&quot;,&quot;tcd-w&quot;);\r\n?&gt;&lt;span&gt;&lt;?php next_posts_link(__('Archives', 'tcd-w')) ?&gt;&lt;\/span&gt;&lt;\/h3&gt;\r\n   &lt;?php\r\n        $odd_or_even = 'odd';\r\n        $args = array('post_type' =&gt; 'post', 'posts_per_page' =&gt; 6,\r\n'order' =&gt; ASC);<\/pre>\n<p>\u203b\u6700\u5f8c\u306e\u884c6\u306e\u6a2a\u306b\u300c, &#8216;order&#8217; => ASC\u300d\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u2461\u304a\u3059\u3059\u3081\u30ab\u30c6\u30b4\u30ea\u30fc1.2.3\u3092\u6607\u9806\u306b\u3059\u308b<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; title: ; notranslate\" title=\"\">\r\n&lt;?php \/\/ Category post1\r\n---------------------------------------------------------------------------------------\r\n?&gt;\r\n  &lt;?php\r\n       if($options&#x5B;'index_category1']) {\r\n       $cat_id1 = $options&#x5B;'index_category1'];\r\n       $cat_info1 = get_category($cat_id1);\r\n       $args = array('post_type' =&gt; 'post', 'numberposts' =&gt; 5,\r\n'category' =&gt; $cat_id1, 'order' =&gt; ASC);\r\n       $index_category_post1 = get_posts($args);\r\n  ?&gt;\r\n\r\n  &lt;?php \/\/ Category post2\r\n---------------------------------------------------------------------------------------\r\n?&gt;\r\n  &lt;?php\r\n       if($options&#x5B;'index_category2']) {\r\n       $cat_id2 = $options&#x5B;'index_category2'];\r\n       $cat_info2 = get_category($cat_id2);\r\n       $args = array('post_type' =&gt; 'post', 'numberposts' =&gt; 5,\r\n'category' =&gt; $cat_id2, 'order' =&gt; ASC);\r\n       $index_category_post2 = get_posts($args);\r\n  ?&gt;\r\n\r\n  &lt;?php \/\/ Category post3\r\n---------------------------------------------------------------------------------------\r\n?&gt;\r\n  &lt;?php\r\n       if($options&#x5B;'index_category3']) {\r\n       $cat_id3 = $options&#x5B;'index_category3'];\r\n       $cat_info3 = get_category($cat_id3);\r\n       $args = array('post_type' =&gt; 'post', 'numberposts' =&gt; 5,\r\n'category' =&gt; $cat_id3, 'order' =&gt; ASC);\r\n       $index_category_post3 = get_posts($args);\r\n  ?&gt;<\/pre>\n<p>\u203b\u300c, &#8216;order&#8217; => ASC\u300d\u3092 $cat_id\u25cf\u306e\u3042\u3068\u306b\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Q.\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u300c\u6700\u8fd1\u306e\u8a18\u4e8b\u300d\u3092\u53e4\u3044\u9806\u306b\u8868\u793a\u3055\u305b\u305f\u3044 \u6700\u8fd1\u306e\u8a18\u4e8b\u3092\u53e4\u3044\u9806\u3067\u8868\u793a\u3055\u305b\u305f\u3044\u306e\u3067\u3059\u304c\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3059\u308c\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u304b\uff1f\u307e\u305f\u3001\u304a\u3059\u3059\u3081\u30ab\u30c6\u30b4\u30ea\u30fc1.2.3\u3092\u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001\u3053\u308c\u3089\u306b\u3082\u8a18\u4e8b\u304c\u53e4\u3044\u9806\u306b\u8868\u793a\u3055\u305b\u305f [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[66,408],"class_list":["post-337","post","type-post","status-publish","format-standard","hentry","category-tcd018","tag-top-page","tag-408"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/337","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=337"}],"version-history":[{"count":0,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/337\/revisions"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}