{"id":21648,"date":"2021-02-27T12:45:23","date_gmt":"2021-02-27T03:45:23","guid":{"rendered":"https:\/\/motoki-design.co.jp\/wordpress\/?p=21648"},"modified":"2024-03-04T18:13:54","modified_gmt":"2024-03-04T09:13:54","slug":"make-search","status":"publish","type":"post","link":"https:\/\/motoki-design.co.jp\/wordpress\/make-search\/","title":{"rendered":"WordPress\u81ea\u4f5c\u30c6\u30fc\u30de\u5236\u4f5c\u2466\u2502\u691c\u7d22\u7d50\u679c\u30da\u30fc\u30b8\u306e\u4f5c\u6210"},"content":{"rendered":"\n<p>WordPress\u306e\u81ea\u4f5c\u30c6\u30fc\u30de\u7b2c7\u5f3e\uff01<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u691c\u7d22\u307e\u308f\u308a\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"21663\">\n<div class=\"wp-block-group is-style-emboss_box\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"has-text-align-center\">\u30b9\u30bf\u30fc\u30bf\u30fc\u30c6\u30fc\u30de\u3092\u4f7f\u308f\u305a\u306b<br><span class=\"swl-fz u-fz-l\">WordPress\u81ea\u4f5c\u30c6\u30fc\u30de<\/span>\u3092\u5236\u4f5c\u3059\u308b<\/p>\n\n\n\n<ul class=\"swell-block-linkList is-style-default\">\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/theme-make-minimal\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2460\u6700\u77ed\u30fb\u6700\u5c0f\u69cb\u6210\u3067\u81ea\u4f5c\u30c6\u30fc\u30de\u3092\u8868\u793a\u3057\u3066\u307f\u308b<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/make-header-footer\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2461\u30d8\u30c3\u30c0\u30fc\u3068\u30d5\u30c3\u30bf\u30fc\u306e\u4f5c\u6210<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/make-menu-widget\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2462\u30e1\u30cb\u30e5\u30fc\u3068\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u4f5c\u6210<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/make-top\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2463\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u4f5c\u6210<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/make-article\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2464\u6295\u7a3f\u30da\u30fc\u30b8\u30fb\u56fa\u5b9a\u30da\u30fc\u30b8\u306e\u4f5c\u6210<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/achive\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2465\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u306e\u4f5c\u6210<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/make-search\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2466\u691c\u7d22\u7d50\u679c\u30da\u30fc\u30b8\u306e\u4f5c\u6210<\/span><\/a><\/li>\n\n\n\n<li class=\"swell-block-linkList__item\"><a class=\"swell-block-linkList__link\" href=\"https:\/\/motoki-design.co.jp\/wordpress\/wordpress-customize\/blog\/make-style-css\/\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-arrowCircleRight swell-block-linkList__icon -left\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M24 45C12.4 45 3 35.6 3 24S12.4 3 24 3s21 9.4 21 21-9.4 21-21 21zm0-39C14.1 6 6 14.1 6 24s8.1 18 18 18 18-8.1 18-18S33.9 6 24 6z\" \/><path d=\"m34.3 22.9-8.8-8.8c-.6-.6-1.5-.6-2.1 0s-.6 1.5 0 2.1l6.3 6.3H14.8c-.8 0-1.5.7-1.5 1.5s.7 1.5 1.5 1.5h14.8l-6.3 6.3c-.6.6-.6 1.5 0 2.1s1.5.6 2.1 0l8.8-8.8c.7-.6.7-1.6.1-2.2z\" \/><\/svg><span class=\"swell-block-linkList__text\">\u2467\u898b\u305f\u76ee\uff08style.css\uff09\u306e\u4f5c\u6210<\/span><\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u306e\u8a2d\u7f6e<\/h2>\n\n\n\n<p>\u307e\u305a\u306f\u691c\u7d22\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u6700\u521d\u304b\u3089\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u691c\u7d22\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u8a2d\u7f6e\u3057\u3066\u3082\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u5c02\u7528\u306e\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u3082\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u306e\u4f5c\u6210<\/h3>\n\n\n\n<p><strong>searchform.php<\/strong>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"search.php\" data-lang=\"PHP\"><code>&lt;form role=&quot;search&quot; method=&quot;get&quot; class=&quot;searchForm&quot; action=&quot;&lt;?php echo home_url(&#39;\/&#39;); ?&gt;&quot; role=&quot;search&quot;&gt;\n    &lt;input type=&quot;text&quot; value=&quot;&quot; name=&quot;s&quot; placeholder=&quot;\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u5165\u529b&quot;&gt;\n    &lt;button type=&quot;submit&quot; value=&quot;search&quot;&gt;\n        &lt;div&gt;\u691c\u7d22&lt;\/div&gt;\n    &lt;\/button&gt;\n&lt;\/form&gt;<\/code><\/pre><\/div>\n\n\n\n<p>action\u5c5e\u6027\u306b\u306f\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306eURL\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>name=\"s\"<\/code>\u3068\u3044\u3046name\u5c5e\u6027\u306e\u8a18\u8ff0\u304c\u91cd\u8981\u306a\u306e\u3067\u3001\u5fd8\u308c\u305a\u306b\u3044\u308c\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d8\u30c3\u30c0\u30fc\u306e\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u3092\u8a2d\u7f6e<\/h3>\n\n\n\n<p>header.php\u306b\u5148\u307b\u3069\u306e\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u3092\u8a2d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>get_search_form();<\/code>\u306e\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u30e1\u30cb\u30e5\u30fc\u306e\u5f8c\u306b\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"header.php\" data-lang=\"PHP\" data-line=\"6,\"><code>    &lt;?php\n    wp_nav_menu([\n        &#39;container&#39; =&gt; &#39;&#39;,\n        &#39;theme_location&#39; =&gt; &#39;global_menu&#39;,\n    ]);\n    get_search_form();\n    ?&gt;<\/code><\/pre><\/div>\n\n\n\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-border\"><img decoding=\"async\" width=\"728\" height=\"485\" src=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_08h53_10.png\" alt=\"\" class=\"wp-image-21654\" srcset=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_08h53_10.png 728w, https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_08h53_10-382x254.png 382w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u691c\u7d22\u7d50\u679c\u30da\u30fc\u30b8\u3092\u4f5c\u6210<\/h2>\n\n\n\n<p><strong>search.php<\/strong>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"search.php\" data-lang=\"PHP\"><code>&lt;?php get_header(); ?&gt;\n&lt;div class=&quot;wrap&quot;&gt;\n    &lt;main&gt;\n        &lt;?php\n        echo &#39;&lt;h1 class=&quot;title&quot;&gt;&#39; . esc_html($_GET[&#39;s&#39;]) . &#39;\u306e\u691c\u7d22\u7d50\u679c\uff1a&#39; . $wp_query-&gt;found_posts . &#39;\u4ef6&lt;\/h1&gt;&#39;;\n        if (have_posts()) :\n            if (!$_GET[&#39;s&#39;]) :\n                echo &#39;&lt;p&gt;\u691c\u7d22\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u672a\u5165\u529b\u3067\u3059&lt;\/p&gt;&#39;;\n            else :\n                while (have_posts()) : the_post();\n        ?&gt;\n                    &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;\n                        &lt;h2 class=&quot;title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/h2&gt;\n                        &lt;div class=&quot;date&quot;&gt;\n                            &lt;div&gt;Release date. &lt;?php the_time(&#39;Y\/m\/d&#39;); ?&gt;&lt;\/div&gt;\n                        &lt;\/div&gt;\n                        &lt;?php\n                        if (has_post_thumbnail()) {\n                            echo &#39;&lt;figure class=&quot;thumbnail&quot;&gt;&#39; . get_the_post_thumbnail() . &#39;&lt;\/figure&gt;&#39;;\n                        }\n                        ?&gt;\n                    &lt;\/a&gt;\n        &lt;?php\n                endwhile;\n                $pagination = get_the_posts_pagination(array(\n                    &#39;prev_text&#39; =&gt; &#39;Prev&#39;,\n                    &#39;next_text&#39; =&gt; &#39;Next&#39;\n                ));\n                echo preg_replace(&#39;\/&lt;h2 class=&quot;screen-reader-text&quot;&gt;[^&lt;]*&lt;\\\/h2&gt;\/ui&#39;, &#39;&#39;, $pagination);\n            endif;\n        else :\n            echo &#39;&lt;p&gt;\u8a18\u4e8b\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002&lt;\/p&gt;&#39;;\n        endif;\n        ?&gt;\n    &lt;\/main&gt;\n&lt;\/div&gt;\n&lt;?php get_footer(); ?&gt;<\/code><\/pre><\/div>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u3001\u5206\u5c90\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u672a\u5165\u529b\u304b\u3069\u3046\u304b\uff1f<\/li>\n\n\n\n<li>\u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u5408\u81f4\u3059\u308b\u8a18\u4e8b\u304c\u3042\u308b\u3069\u3046\u304b\uff1f<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img decoding=\"async\" width=\"812\" height=\"723\" src=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h26_19-812x723.png\" alt=\"\" class=\"wp-image-21655\" srcset=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h26_19-812x723.png 812w, https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h26_19-382x340.png 382w, https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h26_19-768x684.png 768w, https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h26_19.png 924w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u691c\u7d22\u5bfe\u8c61\u3092\u6295\u7a3f\u30da\u30fc\u30b8\u3060\u3051\u306b<\/h3>\n\n\n\n<p>\u691c\u7d22\u5bfe\u8c61\u306b\u56fa\u5b9a\u8a18\u4e8b\u3082\u542b\u307e\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u5236\u9650\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>functions.php<\/strong>\u306b\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"functions.php\" data-lang=\"PHP\"><code>function search_filter($query) {\n    if ($query-&gt;is_search) {\n        $query-&gt;set(&#39;post_type&#39;, &#39;post&#39;);\n    }\n    return $query;\n}\nadd_filter(&#39;pre_get_posts&#39;, &#39;search_filter&#39;);\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">404\u30da\u30fc\u30b8\u306e\u4f5c\u6210<\/h2>\n\n\n\n<p>\u3064\u3044\u3067\u306b\u524a\u9664\u3055\u308c\u305f\u8a18\u4e8b\u304c\u306b\u8868\u793a\u3055\u308c\u308b404\u306e\u8868\u793a\u3082\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>404.php<\/strong>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3001\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"404.php\" data-lang=\"PHP\"><code>&lt;?php get_header(); ?&gt;\n&lt;main id=&quot;main_content&quot;&gt;\n    &lt;h1 class=&quot;title&quot;&gt;\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002&lt;\/h1&gt;\n    &lt;div class=&quot;content&quot;&gt;\n        &lt;p&gt;\u304a\u63a2\u3057\u306e\u30da\u30fc\u30b8\u306f\u79fb\u52d5\u307e\u305f\u306f\u524a\u9664\u3055\u308c\u305f\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002&lt;\/p&gt;\n        &lt;p&gt;\u4ee5\u4e0b\u3088\u308a \u30ad\u30fc\u30ef\u30fc\u30c9 \u3092\u5165\u529b\u3057\u3066\u691c\u7d22\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002&lt;\/p&gt;\n        &lt;?php get_search_form(); ?&gt;\n    &lt;\/div&gt;\n&lt;\/main&gt;\n&lt;?php get_footer(); ?&gt;<\/code><\/pre><\/div>\n\n\n\n<p><code>get_search_form();<\/code>\u306e\u95a2\u6570\u3082\u3044\u308c\u3066\u3001\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u3092\u8a2d\u7f6e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img decoding=\"async\" width=\"646\" height=\"924\" src=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h27_57-812x1161.png\" alt=\"\" class=\"wp-image-21656\" srcset=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h27_57.png 646w, https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h27_57-382x546.png 382w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u691c\u7d22\u307e\u308f\u308a\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u6642\u70b9\u3067\u5408\u8a0814\u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u304c\u3001<\/p>\n\n\n\n<p>\u81ea\u4f5c\u30c6\u30fc\u30de\u3092\u4f5c\u308b\u306e\u306b\u6700\u4f4e\u9650\u5fc5\u8981\u306aphp\u30d5\u30a1\u30a4\u30eb\u306f10\u500b\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"is-style-icon_pen\">\u203bindex.php\u3084searchform.php\u306f\u6700\u60aa\u3001\u7121\u304f\u3066\u3082\u5927\u4e08\u592b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-border\"><img decoding=\"async\" width=\"248\" height=\"425\" src=\"https:\/\/motoki-design.co.jp\/wordpress\/wp-content\/uploads\/2023-02-27_12h38_41.png\" alt=\"\" class=\"wp-image-21657\"\/><\/figure>\n\n\n\n<p>\u3042\u3068\u306f\u898b\u305f\u76ee\u306e\u56dez\u3093\u3084\u5185\u90e8\u69cb\u9020\u306e\u5f37\u5316\u3001\u30d1\u30fc\u30c4\u306e\u52b9\u7387\u5316\u3092\u76ee\u6307\u3057\u306a\u304c\u3089\u4f5c\u308a\u3053\u3093\u3067\u3044\u304f\u3060\u3051\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p>\u30b5\u30a4\u30c8\u5185\u306e\u691c\u7d22\u307e\u308f\u308a\u306b\u95a2\u3057\u3066\u306f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306e\u53ef\u80fd\u6027\u304c\u304b\u306a\u308a\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001<\/p>\n\n\n\n<p>\u81ea\u4f5c\u30c6\u30fc\u30de\u306b\u9650\u3089\u305aSWELL\u3067\u3082\u30e6\u30fc\u30b6\u30fc\u306e\u96e2\u8131\u3092\u9632\u3050\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u6311\u6226\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u306e\u81ea\u4f5c\u30c6\u30fc\u30de\u7b2c7\u5f3e\uff01 \u4eca\u56de\u306f\u691c\u7d22\u307e\u308f\u308a\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u306e\u8a2d\u7f6e \u307e\u305a\u306f\u691c\u7d22\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002 \u6700\u521d\u304b\u3089\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u691c\u7d22\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u8a2d\u7f6e\u3057\u3066\u3082\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u5c02\u7528\u306e\u691c\u7d22\u30d5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":21658,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pochipp_cv_data":"","swell_btn_cv_data":"","footnotes":""},"categories":[93],"tags":[],"area":[],"class_list":["post-21648","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-theme"],"_links":{"self":[{"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/posts\/21648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/comments?post=21648"}],"version-history":[{"count":1,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/posts\/21648\/revisions"}],"predecessor-version":[{"id":24228,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/posts\/21648\/revisions\/24228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/media\/21658"}],"wp:attachment":[{"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=21648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=21648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=21648"},{"taxonomy":"area","embeddable":true,"href":"https:\/\/motoki-design.co.jp\/wordpress\/wp-json\/wp\/v2\/area?post=21648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}