{"id":17916,"date":"2026-09-20T00:46:45","date_gmt":"2026-09-19T15:46:45","guid":{"rendered":"https:\/\/tcd-manual.net\/?p=17916"},"modified":"2026-09-20T00:46:45","modified_gmt":"2026-09-19T15:46:45","slug":"tcd%e3%83%86%e3%83%bc%e3%83%9ezen%ef%bc%9a%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%82%a2%e3%83%bc%e3%82%ab%e3%82%a4%e3%83%96%e3%81%a7%e5%9b%ba%e5%ae%9a%e8%a1%a8%e7%a4%ba%e3%81%ae%e6%8a%95","status":"publish","type":"post","link":"https:\/\/tcd-manual.net\/?p=17916","title":{"rendered":"TCD\u30c6\u30fc\u30deZEN\uff1a\u30ab\u30c6\u30b4\u30ea\u30fc\u30a2\u30fc\u30ab\u30a4\u30d6\u3067\u56fa\u5b9a\u8868\u793a\u306e\u6295\u7a3f\u3092\u5148\u982d\u306b\u51fa\u3059\u65b9\u6cd5"},"content":{"rendered":"<h2 class=\"styled_h2\">Q.\u30ab\u30c6\u30b4\u30ea\u30fc\u30da\u30fc\u30b8\u3067\u56fa\u5b9a\u8868\u793a\u306e\u6295\u7a3f\u304c\u5148\u982d\u306b\u306a\u3089\u306a\u3044<\/h2>\n<p>\u6295\u7a3f\u306e\u7de8\u96c6\u753b\u9762\u3067\u300c\u3053\u306e\u6295\u7a3f\u3092\u5148\u982d\u306b\u56fa\u5b9a\u8868\u793a\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066\u3044\u307e\u3059\u3002\u6295\u7a3f\u4e00\u89a7\u3067\u306f\u5148\u982d\u306b\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u6307\u5b9a\u3057\u305f\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u3067\u306f\u5148\u982d\u306b\u306a\u308a\u307e\u305b\u3093\u3002\u30ab\u30c6\u30b4\u30ea\u30fc\u30a2\u30fc\u30ab\u30a4\u30d6\u3067\u3082\u56fa\u5b9a\u8868\u793a\u306e\u6295\u7a3f\u3092\u5148\u982d\u306b\u51fa\u3059\u65b9\u6cd5\u306f\u3042\u308a\u307e\u3059\u304b\uff1f<\/p>\n<p class=\"styled_h2\">A.functions.php\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u5bfe\u5fdc\u53ef\u80fd\u3067\u3059<\/p>\n<p>\u30ab\u30c6\u30b4\u30ea\u30fc\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u306e\u4e26\u3073\u9806\u306f\u3001\u6a19\u6e96\u3067\u306f\u300c\u56fa\u5b9a\u8868\u793a\u300d\u306e\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u306a\u3044\u4ed5\u69d8\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u5b50\u30c6\u30fc\u30de\u306efunctions.php\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u30a2\u30fc\u30ab\u30a4\u30d6\u3067\u3082\u56fa\u5b9a\u8868\u793a\u306e\u6295\u7a3f\u3092\u5148\u982d\u306b\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/**\r\n* \u30ab\u30c6\u30b4\u30ea\u30fc\u30a2\u30fc\u30ab\u30a4\u30d6\u3067\u56fa\u5b9a\u6295\u7a3f\u3092\u5148\u982d\u306b\u8868\u793a\r\n*\/\r\nadd_filter( &#039;posts_orderby&#039;, function( $orderby, $query ) {\r\nif ( is_admin() || ! $query-&gt;is_main_query() || ! $query-&gt;is_category() || $query-&gt;is_feed() ) {\r\nreturn $orderby;\r\n}\r\n\r\n$sticky_posts = array_map( &#039;absint&#039;, (array) get_option( &#039;sticky_posts&#039;, &#x5B;] ) );\r\nif ( ! $sticky_posts ) {\r\nreturn $orderby;\r\n}\r\n\r\nglobal $wpdb;\r\nreturn &#039;CASE WHEN &#039; . $wpdb-&gt;posts . &#039;.ID IN (&#039; . implode( &#039;,&#039;, $sticky_posts ) . &#039;) THEN 0 ELSE 1 END, &#039; . $orderby;\r\n}, 10, 2 );\r\n<\/pre>\n<p>\u5b50\u30c6\u30fc\u30de\u306efunctions.php\u306f\u89aa\u30c6\u30fc\u30de\u3092\u4e0a\u66f8\u304d\u3059\u308b\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u89aa\u5b50\u4e21\u65b9\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u305f\u3081\u3001\u3053\u306e\u3088\u3046\u306b\u6a5f\u80fd\u8ffd\u52a0\u306e\u30b3\u30fc\u30c9\u3092\u76f4\u63a5\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002\u5225\u30d5\u30a1\u30a4\u30eb\u306b\u5206\u3051\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Q.\u30ab\u30c6\u30b4\u30ea\u30fc\u30da\u30fc\u30b8\u3067\u56fa\u5b9a\u8868\u793a\u306e\u6295\u7a3f\u304c\u5148\u982d\u306b\u306a\u3089\u306a\u3044 \u6295\u7a3f\u306e\u7de8\u96c6\u753b\u9762\u3067\u300c\u3053\u306e\u6295\u7a3f\u3092\u5148\u982d\u306b\u56fa\u5b9a\u8868\u793a\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066\u3044\u307e\u3059\u3002\u6295\u7a3f\u4e00\u89a7\u3067\u306f\u5148\u982d\u306b\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u6307\u5b9a\u3057\u305f\u30a2\u30fc\u30ab\u30a4\u30d6\u30da\u30fc\u30b8\u3067\u306f\u5148\u982d\u306b\u306a\u308a\u307e\u305b\u3093\u3002 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[925],"tags":[686,698],"class_list":["post-17916","post","type-post","status-publish","format-standard","hentry","category-tcd113","tag-686","tag-698"],"_links":{"self":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/17916","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=17916"}],"version-history":[{"count":1,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/17916\/revisions"}],"predecessor-version":[{"id":17917,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=\/wp\/v2\/posts\/17916\/revisions\/17917"}],"wp:attachment":[{"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tcd-manual.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}