{"id":2434,"date":"2016-09-14T12:03:11","date_gmt":"2016-09-14T03:03:11","guid":{"rendered":"http:\/\/tcd-manual.net\/?p=2434"},"modified":"2019-04-04T16:46:36","modified_gmt":"2019-04-04T07:46:36","slug":"tcd%e3%83%86%e3%83%bc%e3%83%9eprecious%ef%bc%9a%e3%83%88%e3%83%83%e3%83%97%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e3%80%8c%e5%95%86%e5%93%81%e4%b8%80%e8%a6%a7%e3%82%92%e8%a6%8b%e3%82%8b%e3%80%8d%e3%81%ae","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=2434","title":{"rendered":"TCD\u30c6\u30fc\u30dePrecious\uff1a\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u300c\u5546\u54c1\u4e00\u89a7\u3092\u898b\u308b\u300d\u306e\u6587\u8a00\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<h4 class=\"style_headline2\"><span>Q.<\/span>\u300c\u5546\u54c1\u4e00\u89a7\u3092\u898b\u308b\u300d\u306e\u6587\u8a00\u3092\u5909\u66f4\u3057\u305f\u3044<\/h4>\n<blockquote><p>\n\u30c6\u30fc\u30de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3001\u30c6\u30fc\u30de\u30aa\u30d7\u30b7\u30e7\u30f3\u3088\u308a\u5909\u66f4\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u5916\u89b3\uff1e\u30c6\u30fc\u30de\u30aa\u30d7\u30b7\u30e7\u30f3\uff1e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u300c\u305d\u306e\u4ed6\u306e\u8a2d\u5b9a\u300d\u3088\u308a\u3001<br \/>\n\u300c\u5546\u54c1\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u306e\u30e9\u30d9\u30eb\u300d\u3092\u5909\u66f4\u304f\u3060\u3055\u3044\u3002\n<\/p><\/blockquote>\n<h4 class=\"style_headline2\"><span>A.<\/span>\u4e0b\u8a18\u306ePHP\u30d5\u30a1\u30a4\u30eb\u306e\u8a72\u5f53\u7b87\u6240\u3092\u524a\u9664\u3057\u307e\u3059<\/h4>\n<p>\u7de8\u96c6\u3059\u308b\u30c6\u30fc\u30de\u30d5\u30a1\u30a4\u30eb\uff1a\u30e1\u30a4\u30f3\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 (index.php)<br \/>\nproduct list\u306e\u90e8\u5206\u306e\u4e0b\u304b\u30894\u884c\u76ee<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\u3000\u3000\u3000\u3000\r\n      &lt;!-- product list --&gt;\r\n &lt;?php\r\n      if ($options&#x5B;'show_index_product']) {\r\n      $args = array('post_type' =&gt; 'product', 'numberposts' =&gt; 6);\r\n      $product_post=get_posts($args);\r\n      if ($product_post) {\r\n ?&gt;\r\n &lt;div id=&quot;index_product&quot;&gt;\r\n  &lt;h3 class=&quot;headline1&quot;&gt;&lt;span&gt;&lt;?php echo $options&#x5B;'index_headline_product']; ?&gt;&lt;\/span&gt;&lt;\/h3&gt;\r\n  &lt;ol class=&quot;clearfix&quot;&gt;\r\n   &lt;?php\r\n        $i = 1;\r\n        foreach ($product_post as $post) : setup_postdata ($post);\r\n        $custom_fields = get_post_custom($post-&gt;ID);\r\n        $value1 = get_post_meta($post-&gt;ID, 'product_image1', true);\r\n        $image1 = wp_get_attachment_image_src($value1, 'size3');\r\n        $product_desc = $custom_fields&#x5B;'product_description']&#x5B;0];\r\n   ?&gt;\r\n   &lt;li class=&quot;num&lt;?php echo $i; ?&gt;&quot;&gt;\r\n    &lt;a class=&quot;image&quot; href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php if (!empty($custom_fields&#x5B;'product_image1']&#x5B;0])) { ?&gt;&lt;img src=&quot;&lt;?php echo $image1&#x5B;0]; ?&gt;&quot; alt=&quot;&quot; title=&quot;&quot; \/&gt;&lt;?php } 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 echo get_the_term_list( $post-&gt;ID, 'product-cat', '&lt;div class=&quot;category&quot;&gt;', ', ', '&lt;\/div&gt;' ); ?&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;?php if (!empty($custom_fields&#x5B;'product_description']&#x5B;0])) { ?&gt;&lt;p class=&quot;desc&quot;&gt;&lt;?php echo $product_desc ; ?&gt;&lt;\/p&gt;&lt;?php }; ?&gt;\r\n   &lt;\/li&gt;\r\n   &lt;?php $i++; endforeach; wp_reset_query(); ?&gt;\r\n  &lt;\/ol&gt;\r\n  &lt;?php if ($options&#x5B;'show_index_product_link']) { ?&gt;&lt;div class=&quot;index_archive_link&quot;&gt;&lt;a href=&quot;&lt;?php echo get_post_type_archive_link('product'); ?&gt;&quot;&gt;&lt;?php _e(&quot;More Products&quot;,&quot;tcd-w&quot;); ?&gt;&lt;\/a&gt;&lt;\/div&gt;&lt;?php }; ?&gt;\r\n &lt;\/div&gt;&lt;!-- END #index_product --&gt;\r\n &lt;?php }; }; ?&gt;\r\n\r\n\r\n<\/pre>\n<p>\u4ee5\u4e0b\u3092\u4fee\u6b63<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n    &lt;?php if ($options&#x5B;'show_index_product_link']) { ?&gt;&lt;div class=&quot;index_archive_link&quot;&gt;&lt;a href=&quot;&lt;?php echo get_post_type_archive_link('product'); ?&gt;&quot;&gt;&lt;?php _e(&quot;More Products&quot;,&quot;tcd-w&quot;); ?&gt;&lt;\/a&gt;\r\n<\/pre>\n<p>\u5909\u66f4\u4f8b<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n    &lt;?php if ($options&#x5B;'show_index_product_link']) { ?&gt;&lt;div class=&quot;index_archive_link&quot;&gt;&lt;a href=&quot;&lt;?php echo get_post_type_archive_link('product'); ?&gt;&quot;&gt;\u4e00\u89a7\u306f\u3053\u3061\u3089&lt;\/a&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Q.\u300c\u5546\u54c1\u4e00\u89a7\u3092\u898b\u308b\u300d\u306e\u6587\u8a00\u3092\u5909\u66f4\u3057\u305f\u3044 \u30c6\u30fc\u30de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3001\u30c6\u30fc\u30de\u30aa\u30d7\u30b7\u30e7\u30f3\u3088\u308a\u5909\u66f4\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5916\u89b3\uff1e\u30c6\u30fc\u30de\u30aa\u30d7\u30b7\u30e7\u30f3\uff1e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u300c\u305d\u306e\u4ed6\u306e\u8a2d\u5b9a\u300d\u3088\u308a\u3001 \u300c\u5546\u54c1\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u306e\u30e9\u30d9\u30eb\u300d\u3092\u5909 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[74],"class_list":["post-2434","post","type-post","status-publish","format-standard","hentry","category-tcd019","tag-word-change"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/2434","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=2434"}],"version-history":[{"count":0,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/2434\/revisions"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}