{"id":17820,"date":"2026-07-16T13:36:26","date_gmt":"2026-07-16T04:36:26","guid":{"rendered":"https:\/\/tcd-manual.net\/?p=17820"},"modified":"2026-07-16T14:53:00","modified_gmt":"2026-07-16T05:53:00","slug":"__trashed-3__trashed-3-102-2","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=17820","title":{"rendered":"TCD\u30c6\u30fc\u30deGRAVITY\uff1a\u7269\u4ef6\u7a2e\u5225\u3068\u30a8\u30ea\u30a2\u306e\u307f\u3067\u691c\u7d22\u53ef\u80fd\u306b\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2 class=\"styled_h2\">Q.\u7269\u4ef6\u7a2e\u5225\u3068\u30a8\u30ea\u30a2\u307e\u3067\u9078\u629e\u5f8c\u3001\u5730\u57df\u3084\u6cbf\u7dda\u3092\u6307\u5b9a\u305b\u305a\u306b\u5bfe\u8c61\u7269\u4ef6\u3092\u691c\u7d22\u3067\u304d\u307e\u3059\u304b\uff1f<\/h2>\n<p>\u25bc\u300c\u5730\u57df\u304b\u3089\u63a2\u3059\u300d\u300c\u6cbf\u7dda\u304b\u3089\u63a2\u3059\u300d\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u72b6\u614b<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku01.jpg\" alt=\"\" width=\"1000\" height=\"564\" class=\"alignnone size-full wp-image-17821 frame\" srcset=\"https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku01.jpg 1000w, https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku01-300x169.jpg 300w, https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku01-768x433.jpg 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p class=\"styled_h2\">A.\u306f\u3044\u3001functions.php\u306b\u8ffd\u8a18\u3059\u308b\u3053\u3068\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u25bc\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u5f8c\u306e\u30a4\u30e1\u30fc\u30b8<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku02.jpg\" alt=\"\" width=\"1000\" height=\"564\" class=\"alignnone size-full wp-image-17822 frame\" srcset=\"https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku02.jpg 1000w, https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku02-300x169.jpg 300w, https:\/\/tcd-manual.net\/wp-content\/uploads\/2026\/07\/gravity_kensaku02-768x433.jpg 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>\u4e0b\u8a18\u8a18\u8ff0\u3092\u30c6\u30fc\u30de\u30d5\u30a1\u30a4\u30eb\u306efunctions.php\u306e\u6700\u4e0b\u90e8\u306b\u30b3\u30d4\u30da\u3059\u308b\u304b\u3001<a class=\"e_link\" href=\"https:\/\/tcd-theme.com\/2019\/08\/code-snippets.html\" target=\"_blank\">Code Snippets<\/a>\u306a\u3069\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<strong>\u30c6\u30fc\u30de\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3059\u308b\u5834\u5408\u306f\u5fc5\u305a\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/strong><\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/ \u5730\u57df\u30fb\u6cbf\u7dda\u306e\u9078\u629e\u30da\u30fc\u30b8\u304b\u3089\u7269\u4ef6\u4e00\u89a7\u30da\u30fc\u30b8\u3078\u30b9\u30ad\u30c3\u30d7\r\nadd_action( &#039;template_redirect&#039;, function () {\r\n\tglobal $tcdr_main_query;\r\n\t\/\/ \u5730\u57df\u30fb\u6cbf\u7dda\u306e\u9078\u629e\u30da\u30fc\u30b8\u4ee5\u5916\u306f\u7d42\u4e86\r\n\tif( ! $tcdr_main_query?-&gt;is_search_selection ){\r\n\t\treturn;\r\n\t}\r\n\t\/\/ \u5730\u57df or \u6cbf\u7dda \u306e term\u4e00\u89a7\u3092\u53d6\u5f97\r\n\t$tcdr_custom_counts = match ( get_query_var( &#039;type&#039; ) ) {\r\n\t\t\/\/ \u30a8\u30ea\u30a2\r\n\t\t&#039;area&#039; =&gt; TCD\\Realty\\Helper\\get_area_property_type_counts(),\r\n\t\t\/\/ \u6cbf\u7dda\r\n\t\t&#039;transit&#039; =&gt; TCD\\Realty\\Helper\\get_transit_property_type_counts(\r\n\t\t\t$tcdr_main_query-&gt;pref-&gt;slug ),\r\n\t\tdefault =&gt; &#x5B;],\r\n\t};\r\n\t\/\/ \u7269\u4ef6\u6570\u304c\u306a\u3051\u308c\u3070\u7d42\u4e86\r\n\tif( empty( $tcdr_custom_counts ) ){\r\n\t\treturn;\r\n\t}\r\n\t\/\/ \u7269\u4ef6\u60c5\u5831\u306e\u53d6\u5f97\r\n\t$terms = match ( get_query_var( &#039;type&#039; ) ) {\r\n\t\t\/\/ \u5730\u57df\r\n\t\t&#039;area&#039; =&gt; get_terms(\r\n\t\t\t&#x5B;\r\n\t\t\t\t&#039;taxonomy&#039; =&gt; &#039;area&#039;,\r\n\t\t\t\t&#039;hide_empty&#039; =&gt; true,\r\n\t\t\t\t&#039;parent&#039; =&gt; $tcdr_main_query-&gt;pref?-&gt;term_id,\r\n\t\t\t\t&#039;orderby&#039; =&gt; &#039;slug&#039;,\r\n\t\t\t\t&#039;include&#039; =&gt; array_keys( $tcdr_custom_counts ),\r\n\t\t\t]\r\n\t\t),\r\n\t\t\/\/ \u6cbf\u7dda\r\n\t\t&#039;transit&#039; =&gt; get_terms(\r\n\t\t\t&#x5B;\r\n\t\t\t\t&#039;taxonomy&#039; =&gt; &#039;transit&#039;,\r\n\t\t\t\t&#039;hide_empty&#039; =&gt; true,\r\n\t\t\t\t&#039;orderby&#039; =&gt; &#039;slug&#039;,\r\n\t\t\t\t&#039;include&#039; =&gt; array_keys( $tcdr_custom_counts )\r\n\t\t\t]\r\n\t\t),\r\n\t\tdefault =&gt; null\r\n\t};\r\n\t\/\/ term ID\u4e00\u89a7\u3092\u53d6\u5f97\r\n\t$term_ids = wp_list_pluck( $terms, &#039;term_id&#039; );\r\n\t\/\/ \u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5148URL\r\n\t$redirect_url_params = &#x5B;\r\n\t\t&#039;property-type&#039; =&gt; get_queried_object()-&gt;slug,\r\n\t\t&#039;pref&#039; =&gt; $tcdr_main_query-&gt;pref?-&gt;term_id,\r\n\t\t&#039;type&#039; =&gt; get_query_var( &#039;type&#039; ),\r\n\t\t&#039;all&#039; =&gt; get_query_var( &#039;type&#039; ) === &#039;area&#039; ? 1 : &#039;&#039;,\r\n\t\t&#039;ids&#039; =&gt; $term_ids\r\n\t];\r\n\twp_safe_redirect(\r\n\t\tadd_query_arg( $redirect_url_params ),\r\n\t\t302\r\n\t);\r\n\texit;\r\n} );\r\n\r\n\/\/ \u5730\u57df\u30fb\u6cbf\u7dda\u306e\u30d1\u30f3\u304f\u305a\u30ea\u30b9\u30c8\u3092\u524a\u9664 + \u691c\u7d22\u30dc\u30bf\u30f3\u30a8\u30ea\u30a2\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\r\nadd_action( &#039;wp_head&#039;, function() {\r\n\t?&gt;\r\n\t&lt;style&gt;\r\n\tbody.tax-property-type .c-breadcrumb__item:nth-child(3),\r\n\tbody.single-contents1:has(.c-breadcrumb__item:nth-child(5))\r\n\t\t.c-breadcrumb__item:nth-child(3) {\r\n\t\tdisplay: none;\r\n\t}\r\n\t\/* \u691c\u7d22\u30dc\u30bf\u30f3\u3092\u542b\u3080\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u30e9\u30d9\u30eb\u975e\u8868\u793a + \u30b0\u30ea\u30c3\u30c9\u30921\u30ab\u30e9\u30e0\u5316 *\/\r\n\t.p-property-search-entrance-section:has(.p-property-search-entrance-submit) {\r\n\t\tgrid-template-columns: 1fr;\r\n\t}\r\n\t.p-property-search-entrance-section:has(.p-property-search-entrance-submit)\r\n\t\t.p-property-search-entrance-section-label {\r\n\t\tdisplay: none;\r\n\t}\r\n\t\/* \u6cbf\u7dda\u304b\u3089\u63a2\u3059\u30dc\u30bf\u30f3\u3092\u975e\u8868\u793a *\/\r\n\t.p-property-search-entrance-submit-button&#x5B;value=&quot;transit&quot;] {\r\n\t\tdisplay: none;\r\n\t}\r\n\t\/* \u6b8b\u3063\u305f\u300c\u5730\u57df\u304b\u3089\u63a2\u3059\u300d\u30dc\u30bf\u30f3\u3092\u4e2d\u592e\u914d\u7f6e\u30fb\u5e45350px\u306b\u56fa\u5b9a *\/\r\n\t.p-property-search-entrance-submit {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: center;\r\n\t\twidth: 100%;\r\n\t}\r\n\t.p-property-search-entrance-submit-button&#x5B;value=&quot;area&quot;] {\r\n\t\twidth: 350px;\r\n\t\tmax-width: 100%;\r\n\t\tflex: none;\r\n\t}\r\n\t&lt;\/style&gt;\r\n\t&lt;?php\r\n}, 11 );\r\n\r\n\/\/ \u30dc\u30bf\u30f3\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u300c\u691c\u7d22\u3059\u308b\u300d\u306b\u5909\u66f4\r\nadd_action( &#039;wp_footer&#039;, function() {\r\n\t?&gt;\r\n\t&lt;script&gt;\r\n\tdocument.addEventListener(&#039;DOMContentLoaded&#039;, function () {\r\n\t\tvar btn = document.querySelector(&#039;.p-property-search-entrance-submit-button&#x5B;value=&quot;area&quot;]&#039;);\r\n\t\tif ( btn ) {\r\n\t\t\tvar icon = btn.querySelector(&#039;.p-property-search-entrance-submit-icon&#039;);\r\n\t\t\tbtn.textContent = &#039;\u691c\u7d22\u3059\u308b&#039;;\r\n\t\t\tif ( icon ) {\r\n\t\t\t\tbtn.prepend(icon);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t&lt;\/script&gt;\r\n\t&lt;?php\r\n} );\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Q.\u7269\u4ef6\u7a2e\u5225\u3068\u30a8\u30ea\u30a2\u307e\u3067\u9078\u629e\u5f8c\u3001\u5730\u57df\u3084\u6cbf\u7dda\u3092\u6307\u5b9a\u305b\u305a\u306b\u5bfe\u8c61\u7269\u4ef6\u3092\u691c\u7d22\u3067\u304d\u307e\u3059\u304b\uff1f \u25bc\u300c\u5730\u57df\u304b\u3089\u63a2\u3059\u300d\u300c\u6cbf\u7dda\u304b\u3089\u63a2\u3059\u300d\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u72b6\u614b A.\u306f\u3044\u3001functions.php\u306b\u8ffd\u8a18\u3059\u308b\u3053\u3068\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u3067\u3059\u3002  [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[920],"tags":[74,83],"class_list":["post-17820","post","type-post","status-publish","format-standard","hentry","category-tcd111","tag-word-change","tag-function-release"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/17820","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=17820"}],"version-history":[{"count":12,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/17820\/revisions"}],"predecessor-version":[{"id":17834,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/17820\/revisions\/17834"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}