{"id":1785,"date":"2023-12-19T08:00:00","date_gmt":"2023-12-18T23:00:00","guid":{"rendered":"https:\/\/baigie.me\/engineerblog\/?p=1785"},"modified":"2023-12-20T09:26:43","modified_gmt":"2023-12-20T00:26:43","slug":"contact-form-7%e3%81%a7%e5%8b%95%e7%9a%84%e3%81%ab%e9%81%b8%e6%8a%9e%e8%82%a2%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95%e3%80%80","status":"publish","type":"post","link":"https:\/\/baigie.me\/engineerblog\/contact-form-7%e3%81%a7%e5%8b%95%e7%9a%84%e3%81%ab%e9%81%b8%e6%8a%9e%e8%82%a2%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95%e3%80%80\/","title":{"rendered":"Contact Form 7\u3067\u52d5\u7684\u306b\u9078\u629e\u80a2\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5\u3000"},"content":{"rendered":"\n<p>Contact Form 7\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3001\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3001\u30d7\u30eb\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u306a\u3069\u306e\u9078\u629e\u80a2\u3092\u52d5\u7684\u306b\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308b\u3002\u4f8b\u3048\u3070\u3001\u300c\u88fd\u54c1\u300d\u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u3092\u542b\u3080\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304c\u3042\u308b\u3068\u3057\u3088\u3046\u3002\u3053\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3067\u3001\u300c\u88fd\u54c1\u306b\u95a2\u3059\u308b\u304a\u554f\u3044\u5408\u308f\u305b\u300d\u30d5\u30a9\u30fc\u30e0\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u3001\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u3067\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u88fd\u54c1\u306e\u540d\u524d\u3092\u53d6\u5f97\u3057\u3001\u305d\u308c\u3089\u3092\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u9078\u629e\u80a2\u3068\u3057\u3066\u52d5\u7684\u306b\u8868\u793a\u3059\u308b\u3068\u3044\u3046\u3088\u3046\u306a\u72b6\u6cc1\u3060\u3002<\/p>\n\n\n\n<p>WordPress\u3067\u306e\u30d5\u30a9\u30fc\u30e0\u958b\u767a\u306b\u306f\u6709\u540d\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u300cContat Form 7\u300d\u3092\u4f7f\u3046\u3053\u3068\u3082\u591a\u3044\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u305d\u306eContact Form 7\u3092\u4f7f\u7528\u3057\u305f\u30d5\u30a9\u30fc\u30e0\u3067\u3001\u4e0a\u8ff0\u306e\u300c\u52d5\u7684\u306b\u9078\u629e\u80a2\u3092\u751f\u6210\u3059\u308b\u300d\u3068\u3044\u3046\u4ed5\u69d8\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u5b9f\u88c5\u65b9\u6cd5\u3092\u7d39\u4ecb\u3059\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-baigie-block-heading\">\u5b9f\u88c5\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u624b\u9806\u306f\u81f3\u3063\u3066\u30b7\u30f3\u30d7\u30eb\u3002<\/p>\n\n\n\n<ul>\n<li>\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u306e\u60c5\u5831\u3092\u5438\u3044\u51fa\u3057\u3066HTML\u3092\u751f\u6210\u3059\u308b\u95a2\u6570\u3092\u4f5c\u6210\u3059\u308b\u3002<\/li>\n\n\n\n<li>\u95a2\u6570\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u3002\n<ul>\n<li>WP_Query\u3067\u6295\u7a3f\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u307e\u308f\u3059\u3002<\/li>\n\n\n\n<li>ob_start\u3067\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3001\u305d\u306e\u4e2d\u3067HTML\u3092\u66f8\u304f\u3002<br>\u30bf\u30a4\u30c8\u30eb\u3084\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u306a\u3069\u81ea\u7531\u306b\u53d6\u5f97\u53ef\u80fd\u3002<\/li>\n\n\n\n<li>\u6700\u5f8c\u306b\u30d0\u30c3\u30d5\u30a1\u3092\u8fd4\u3059<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u4f5c\u6210\u3057\u305f\u95a2\u6570\u3092Contact Form7\u306e\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u306b\u767b\u9332\u3002<\/li>\n\n\n\n<li>\u4f5c\u6210\u3057\u305f\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u3092Contact Form7\u306e\u7de8\u96c6\u753b\u9762\u306b\u5f35\u308a\u4ed8\u3051\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002\uff08functions.php\u306b\u8a18\u8f09\u3059\u308b\u3002\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfunction add_original_choices()\n{\n\n  ob_start();\n\n  $args = array(\n    'post_type' =&gt; 'works', \/\/works\u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u3092\u3082\u3068\u306b\u52d5\u7684\u306binput\u3092\u751f\u6210\n    'order' =&gt; 'ASC'\n  );\n\n  $the_query = new WP_Query($args);\n  $i = 0;\n  if ($the_query-&gt;have_posts()) : while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post();\n?&gt;\n      &lt;label for=\"&lt;?php echo $i; ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/label&gt; &lt;!-- $post\u306eID\u3092\u3082\u3068\u306b\u672c\u6587\u3084\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u306a\u3069\u81ea\u7531\u306b\u53d6\u5f97\u53ef\u80fd --&gt;\n       &lt;input type=\"checkbox\" id=\"&lt;?php echo $i; ?&gt;\" value=\"&lt;?php the_title(); ?&gt;\"&gt;\n&lt;?php\n      $i++;\n    endwhile;\n  endif;\n  return ob_get_clean();\n}\nwpcf7_add_form_tag('add_original_tag', 'add_original_choices');\n\/\/ \u3053\u306e\u5834\u5408\u300cadd_original_tag\u300d\u304c\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u540d\n<\/code><\/pre>\n\n\n\n<p>add_original_choices\u3068\u3044\u3046\u95a2\u6570\u3067\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u306e\u60c5\u5831\u3092\u5438\u3044\u51fa\u3057\u3001HTML\u3092\u751f\u6210\u3057return\u3059\u308b\u3002wpcf7_add_form_tag\u306fContact Form7\u306b\u72ec\u81ea\u306e\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u95a2\u6570\u306a\u306e\u3067\u3001\u305d\u308c\u3092\u5229\u7528\u3057\u3066add_original_choices\u95a2\u6570\u3092add_original_tag\u3068\u3044\u3046\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u306b\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u4e0a\u8a18\u3067\u4f5c\u6210\u3057\u305fadd_original_tag\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u3092Contact Form7\u306e\u7de8\u96c6\u753b\u9762\u306b\u5f35\u308a\u4ed8\u3051\u308c\u3070\u5b8c\u6210\u3060\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contact Form 7\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3001\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3001\u30d7\u30eb\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u306a\u3069\u306e\u9078\u629e\u80a2\u3092\u52d5\u7684\u306b\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308b\u3002\u4f8b\u3048\u3070\u3001\u300c\u88fd\u54c1\u300d\u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u3092\u542b\u3080\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304c\u3042\u308b\u3068\u3057\u3088\u3046\u3002\u3053\u306e\u30a6\u30a7\u30d6\u30b5 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"_links":{"self":[{"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/posts\/1785"}],"collection":[{"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/comments?post=1785"}],"version-history":[{"count":10,"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/posts\/1785\/revisions"}],"predecessor-version":[{"id":1804,"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/posts\/1785\/revisions\/1804"}],"wp:attachment":[{"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/media?parent=1785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/baigie.me\/engineerblog\/wp-json\/wp\/v2\/categories?post=1785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}