{"id":2705,"date":"2018-11-05T21:05:25","date_gmt":"2018-11-05T12:05:25","guid":{"rendered":"https:\/\/hiro7216.mydns.jp\/blog\/?p=2705"},"modified":"2024-01-29T23:07:44","modified_gmt":"2024-01-29T14:07:44","slug":"%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e5%88%a5%e5%85%a8%e6%8a%95%e7%a8%bf%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e4%b8%80%e8%a6%a7%e3%81%ae%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e3%82%92","status":"publish","type":"post","link":"https:\/\/hiro7216.mydns.jp\/blog\/?p=2705","title":{"rendered":"\u30ab\u30c6\u30b4\u30ea\u30fc\u5225\u5168\u6295\u7a3f\u30bf\u30a4\u30c8\u30eb\u4e00\u89a7\u306e\u56fa\u5b9a\u30da\u30fc\u30b8\u3092\u8ffd\u52a0"},"content":{"rendered":"\n<p>\u5168\u8a18\u4e8b\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b5\u30a4\u30c8\u30de\u30c3\u30d7\u307f\u305f\u3044\u306a\u3082\u306e\u304c\u6b32\u3057\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u5358\u306b\u30bf\u30a4\u30c8\u30eb\u3092\u5168\u90e8\u4e26\u3079\u305f\u3060\u3051\u3067\u306f\u975e\u5e38\u306b\u898b\u96e3\u3044\u3002<br>\u5e0c\u671b\u3092\u6e80\u305f\u305b\u308b\u3082\u306e\u304c\u306a\u3044\u304b\u5c11\u3057\u63a2\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u4f5c\u3063\u305f\u65b9\u304c\u65e9\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u4f5c\u308a\u307e\u3057\u305f\u3002<br>\u4eca\u56de\u306f\u30bf\u30b0\u3067\u306f\u306a\u304f\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u4f7f\u3063\u305f\u6295\u7a3f\u30bf\u30a4\u30c8\u30eb\u4e00\u89a7\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u52d5\u304d\u3068\u3057\u3066\u306f\u3001\u307e\u305a\u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u53d6\u5f97\u3057\u3001\u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u306b\u5c5e\u3057\u3066\u3044\u308b\u6295\u7a3f\u306e\u30bf\u30a4\u30c8\u30eb\u4e00\u89a7\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\u4f46\u3057\u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u306e\u5b50\u30ab\u30c6\u30b4\u30ea\u30fc\u306b\u5c5e\u3057\u3066\u3044\u305f\u5834\u5408\u306f\u4e00\u89a7\u306b\u542b\u307f\u307e\u305b\u3093\u3002<br>\u66f4\u306b\u89aa\u30ab\u30c6\u30b4\u30ea\u306e\u4e0b\u306b\u306f\u5c5e\u3059\u308b\u5b50\u30ab\u30c6\u30b4\u30ea\u3092\u8868\u793a\u3057\u3001\u305d\u306e\u5b50\u30ab\u30c6\u30b4\u30ea\u306b\u5c5e\u3059\u308b\u6295\u7a3f\u306e\u30bf\u30a4\u30c8\u30eb\u4e00\u89a7\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\uff08\u4eca\u56de\u306f\u5bfe\u8c61\u306e\u5b50\u30ab\u30c6\u30b4\u30ea\u30fc\u306f\u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u306e1\u968e\u5c64\u4e0b\u307e\u3067\u3068\u3057\u307e\u3057\u305f\uff09<br>\u6587\u7ae0\u3067\u66f8\u304f\u3068\u5206\u304b\u308a\u306b\u304f\u3044\u3067\u3059\u304c\u3001\u79c1\u306e\u56fa\u5b9a\u30da\u30fc\u30b8\u3092\u898b\u3066\u9802\u3051\u308c\u3070\u76f4\u3050\u306b\u5206\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br><a href=\"https:\/\/hiro7216.mydns.jp\/blog\/?page_id=601\" target=\"_blank\" rel=\"noopener noreferrer\">\u30b3\u30f3\u30c6\u30f3\u30c4\u4e00\u89a7<\/a><\/p>\n\n\n\n<p>\u307e\u305awp-content\/themes\/all_contents.php\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8a18\u8ff0\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\n\t.all_contents_sub_category {\n\t\tpadding-left: 1em;\n\t}\n\n&lt;?php\n\/\/ \u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u53d6\u5f97\n$top_categories = get_categories(array('parent' => 0, 'orderby' => 'term_order'));\n\/\/ \u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u5206\u30eb\u30fc\u30d7\nforeach($top_categories as $top_category) :\n\t\/\/ \u89aa\u30ab\u30c6\u30b4\u30ea\u30fc\u306e\u30ea\u30f3\u30af\u4f5c\u6210 ?><\/pre>\n\n\n\n<div><a href=\"<?php echo get_category_link( $top_category->term_id ); ?>&#8221;> <b>\u2606&lt;?php echo $top_category-&gt;cat_name; ?&gt;<\/b> <\/a><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"<?php the_permalink() ?>&#8220;>&lt;?php the_title(); ?&gt;<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\t&lt;?php\n\t\/\/ \u5b50\u30ab\u30c6\u30b4\u30ea\u30fc\u306e\u30ea\u30f3\u30af\u3092\u4f5c\u6210\n\t$child_categories = get_categories(array('child_of' => $top_category->cat_ID, 'orderby' => 'term_order'));\n\tforeach($child_categories as $child_category) :?><\/pre>\n\n\n\n<div class=\"all_contents_sub_category\">\n<div><a href=\"<?php echo get_category_link( $child_category->term_id ); ?>&#8221;> &lt;?php echo $top_category-&gt;cat_name . &#8216;\uff1a&#8217; . $child_category-&gt;cat_name; ?&gt;<\/a><\/div>\n<ul>&lt;?php \/\/ \u6295\u7a3f\u306e\u53d6\u5f97 $posts = get_posts(array(&#8216;category&#8217; =&gt; $child_category-&gt;term_id, &#8216;posts_per_page&#8217; =&gt; -1, &#8216;orderby&#8217; =&gt; &#8216;date&#8217;, &#8216;order&#8217; =&gt; &#8216;ASC&#8217;)); foreach($posts as $post) : setup_postdata( $post ); \/\/ \u6295\u7a3f\u5206\u30eb\u30fc\u30d7 ?&gt;\n<li><a href=\"<?php the_permalink() ?>&#8220;>&lt;?php the_title(); ?&gt;<\/a><\/li>\n&lt;?php endforeach; wp_reset_postdata();?&gt;<\/ul>\n<\/div>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\t&lt;?php endforeach; ?>\n&lt;?php endforeach; ?>\n<\/pre>\n\n\n\n<p>\u3053\u308c\u3060\u3051\u3067\u306f\u56fa\u5b9a\u30da\u30fc\u30b8\u304b\u3089\u547c\u3073\u51fa\u305b\u307e\u305b\u3093\u306e\u3067\u3001\u30c6\u30fc\u30de\u306efunction.php\u306b\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/*\n* \u30b3\u30f3\u30c6\u30f3\u30c4\u4e00\u89a7\u306ephp\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\n*\/\nfunction include_all_contents_php( $atts ){\n\tob_start();\n\tget_template_part('..\/all_contents'); \/\/ ..\/all_contents.php\u3092\u8aad\u307f\u3053\u307f\n\treturn ob_get_clean();\n}\nadd_shortcode( 'include_all_contents', 'include_all_contents_php' );\n<\/pre>\n\n\n\n<p>\u3053\u308c\u306f\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u3068\u547c\u3070\u308c\u308b\u65b9\u6cd5\u3067\u3001PHP\u3092\u6295\u7a3f\u3084\u56fa\u5b9a\u30da\u30fc\u30b8\u304b\u3089\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002<br>\u6295\u7a3f\u3084\u56fa\u5b9a\u30da\u30fc\u30b8\u306b\u306f\u57fa\u672c\u7684\u306bPHP\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u7c21\u5358\u306b\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3042\u3068\u306f\u56fa\u5b9a\u30da\u30fc\u30b8\u3067\uff3binclude_all_contents\uff3d\u3068\u66f8\u3051\u3070\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<br><span style=\"color: #ff0000;\">\u203b\u305d\u306e\u307e\u307e\u66f8\u3044\u3066\u3057\u307e\u3046\u3068\u547c\u3073\u51fa\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u4e0a\u3067\u306f[]\u3092\u5168\u89d2\u6587\u5b57\u3067\u66f8\u3044\u3066\u307e\u3059\u306e\u3067\u534a\u89d2\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n\n\n\n<p>\u5c1a\u3001\u300cCategory Order and Taxonomy Terms Order\u300d\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u4e26\u3073\u66ff\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u4e26\u3073\u66ff\u3048\u305f\u9806\u756a\u3067\u30ab\u30c6\u30b4\u30ea\u30fc\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5168\u8a18\u4e8b\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b5\u30a4\u30c8\u30de\u30c3\u30d7\u307f\u305f\u3044\u306a\u3082\u306e\u304c\u6b32\u3057\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u5358\u306b\u30bf\u30a4\u30c8\u30eb\u3092\u5168\u90e8\u4e26\u3079\u305f\u3060\u3051\u3067\u306f\u975e\u5e38\u306b\u898b\u96e3\u3044\u3002\u5e0c\u671b\u3092\u6e80\u305f\u305b\u308b\u3082\u306e\u304c\u306a\u3044\u304b\u5c11\u3057\u63a2\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u4f5c\u3063\u305f\u65b9\u304c\u65e9\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u4f5c\u308a\u307e\u3057\u305f\u3002\u4eca &hellip; <a href=\"https:\/\/hiro7216.mydns.jp\/blog\/?p=2705\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u30ab\u30c6\u30b4\u30ea\u30fc\u5225\u5168\u6295\u7a3f\u30bf\u30a4\u30c8\u30eb\u4e00\u89a7\u306e\u56fa\u5b9a\u30da\u30fc\u30b8\u3092\u8ffd\u52a0<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[60,61,64],"class_list":["post-2705","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-wordprwss","tag-php","tag-64"],"_links":{"self":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2705"}],"version-history":[{"count":0,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2705\/revisions"}],"wp:attachment":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}