{"id":1416,"date":"2017-03-30T22:02:47","date_gmt":"2017-03-30T13:02:47","guid":{"rendered":"http:\/\/www.clarenet.co.jp\/column\/engineer\/?p=663"},"modified":"2017-03-30T22:02:47","modified_gmt":"2017-03-30T13:02:47","slug":"wp%e7%9b%b4%e8%bf%91%e3%81%ae%e5%ad%90%e3%82%bf%e3%83%bc%e3%83%a0%e3%81%ae%e3%81%bf%e3%81%ae%e4%b8%80%e8%a6%a7","status":"publish","type":"post","link":"https:\/\/4koma-web.com\/coding\/wp%e7%9b%b4%e8%bf%91%e3%81%ae%e5%ad%90%e3%82%bf%e3%83%bc%e3%83%a0%e3%81%ae%e3%81%bf%e3%81%ae%e4%b8%80%e8%a6%a7\/","title":{"rendered":"WP:\u76f4\u8fd1\u306e\u5b50\u30bf\u30fc\u30e0\u306e\u307f\u306e\u4e00\u89a7"},"content":{"rendered":"<p>\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001\u5b50\u30bf\u30fc\u30e0\u3092\u6301\u3064\u304b\u3069\u3046\u304b\u3067\u51e6\u7406\u3092\u5206\u5c90\u3057\u3001\u5b50\u30bf\u30fc\u30e0\u304c\u3042\u308b\u5834\u5408\u306b\u306f\u3059\u3079\u3066\u306e\u30bf\u30fc\u30e0\u60c5\u5831\u3092\u4e00\u89a7\u3067\u8868\u793a\u3057\u3001<br \/>\n\u5b50\u3092\u6301\u305f\u306a\u3044\u5834\u5408\u306b\u306f\u6295\u7a3f\u306e\u4e00\u89a7\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\n\u305d\u3057\u3066\u3001\u4eca\u56de\u306f\u300c\u3059\u3079\u3066\u306e\u5b50\u30bf\u30fc\u30e0\u60c5\u5831\u300d\u3068\u3044\u3046\u3068\u3053\u308d\u304c\u30cd\u30c3\u30af\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3059\u3079\u3066\u3001\u3067\u306f\u306a\u304f\u76f4\u8fd1\u306e\u5b50\u306e\u30bf\u30fc\u30e0\u60c5\u5831\u3060\u3051\u306e\u4e00\u89a7\u3092\u8868\u793a\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u3002<\/p>\n<p>\u524d\u56de\u3001\u30bf\u30fc\u30e0\u60c5\u5831\u306e\u53d6\u5f97\u306b\u4f7f\u3063\u3066\u3044\u305f\u95a2\u6570\u306f\u300cget_term_children\u300d\u3067\u3057\u305f\u304c\u3001<br \/>\n\u3053\u308c\u306f\u5168\u3066\u306e\u30bf\u30fc\u30e0\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067\u306f\u5177\u5408\u304c\u60aa\u3044\u306e\u3067\u3001\u4eca\u56de\u306f\u300cget_terms\u300d\u306b\u66f8\u304d\u63db\u3048\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?php\n            $term_id = $taxonomy-&gt;term_id;\n            $children = get_term_children( $term_id, $taxonomy_name );\n            if ( $children ): \/\/\u5b50\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u6301\u3064\u5834\u5408\n            ?&gt;\n            \n            &lt;?php\n            $taxonomy_name = 'safety-cat';\n            $terms = get_terms( $taxonomy_name, array(\n              'parent' =&gt; $term_id,\n              'hide_empty' =&gt; false,\n              'orderby' =&gt; 'term_order',\n            ));\n            foreach ( $terms as $term ) :\n            ?&gt;\n              &lt;tr&gt;&lt;td&gt;&lt;a href=\"&lt;?php echo get_term_link( $term ); ?&gt;\"&gt;&lt;?php echo $term-&gt;name; ?&gt;&lt;\/a&gt;&lt;td&gt;&lt;\/th&gt;\n\n            &lt;?php endforeach; ?&gt;<\/pre>\n<p>parent\u306b\u30bf\u30fc\u30e0ID\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3084\u308b\u3053\u3068\u3067\u3001\u76f4\u8fd1\u306e\u5b50\u30bf\u30fc\u30e0\u60c5\u5831\u3092\u5f15\u3063\u5f35\u3063\u3066\u304f\u308c\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067\u76ee\u7684\u304c\u679c\u305f\u305b\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001\u5b50\u30bf\u30fc\u30e0\u3092\u6301\u3064\u304b\u3069\u3046\u304b\u3067\u51e6\u7406\u3092\u5206\u5c90\u3057\u3001\u5b50\u30bf\u30fc\u30e0\u304c\u3042\u308b\u5834\u5408\u306b\u306f\u3059\u3079\u3066\u306e\u30bf\u30fc\u30e0\u60c5\u5831\u3092\u4e00\u89a7\u3067\u8868\u793a\u3057\u3001 \u5b50\u3092\u6301\u305f\u306a\u3044\u5834\u5408\u306b\u306f\u6295\u7a3f\u306e\u4e00\u89a7\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u3057\u3066\u3001\u4eca\u56de\u306f\u300c\u3059\u3079\u3066\u306e\u5b50\u30bf\u30fc\u30e0\u60c5\u5831\u300d\u3068\u3044\u3046\u3068\u3053\u308d\u304c\u30cd\u30c3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":612,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[1],"tags":[],"publishpress_future_action":{"enabled":false,"date":"2026-04-21 20:35:25","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1416"}],"collection":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/comments?post=1416"}],"version-history":[{"count":0,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1416\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media\/612"}],"wp:attachment":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media?parent=1416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/categories?post=1416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/tags?post=1416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}