{"id":28902,"date":"2024-11-25T11:22:05","date_gmt":"2024-11-25T03:22:05","guid":{"rendered":"https:\/\/fwq.ai\/blog\/28902\/"},"modified":"2024-11-25T11:22:05","modified_gmt":"2024-11-25T03:22:05","slug":"wordpress%e7%bc%96%e8%be%91%e6%97%a5%e6%9c%9f%e6%80%8e%e4%b9%88%e5%8f%96%e6%b6%88","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/28902\/","title":{"rendered":"wordpress\u7f16\u8f91\u65e5\u671f\u600e\u4e48\u53d6\u6d88"},"content":{"rendered":"<blockquote><p>\n  wordpress \u7f16\u8f91\u65e5\u671f\u53ef\u4ee5\u901a\u8fc7\u4e09\u79cd\u65b9\u6cd5\u53d6\u6d88\uff1a1. \u5b89\u88c5 enable post date disable \u63d2\u4ef6\uff1b2. \u5728 functions.php \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee3\u7801\uff1b3. \u624b\u52a8\u7f16\u8f91 wp_posts \u8868\u4e2d\u7684 post_modified \u5217\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/05\/2024060502241780858.jpg\" class=\"aligncenter\" title=\"wordpress\u7f16\u8f91\u65e5\u671f\u600e\u4e48\u53d6\u6d88\u63d2\u56fe\" alt=\"wordpress\u7f16\u8f91\u65e5\u671f\u600e\u4e48\u53d6\u6d88\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u53d6\u6d88 WordPress \u7f16\u8f91\u65e5\u671f<\/strong><\/p>\n<p>WordPress \u4f1a\u81ea\u52a8\u4e3a\u5df2\u53d1\u5e03\u7684\u535a\u5ba2\u6587\u7ae0\u6dfb\u52a0\u7f16\u8f91\u65e5\u671f\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u9690\u85cf\u6216\u53d6\u6d88\u6b64\u65e5\u671f\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u53d6\u6d88 WordPress \u7f16\u8f91\u65e5\u671f\uff1a<\/p>\n<p><strong>\u65b9\u6cd5 1\uff1a\u4f7f\u7528\u63d2\u4ef6<\/strong><\/p>\n<ul>\n<li>\u5b89\u88c5\u548c\u6fc0\u6d3b Enable Post Date Disable \u63d2\u4ef6\u3002<\/li>\n<li>\u8f6c\u5230\u201c\u8bbe\u7f6e\u201d&gt;\u201cEnable Post Date Disable\u201d\u3002<\/li>\n<li>\u52fe\u9009\u201c\u7981\u7528\u6240\u6709\u6587\u7ae0\u65e5\u671f\u201d\u6846\u3002<\/li>\n<li>\u5355\u51fb\u201c\u4fdd\u5b58\u66f4\u6539\u201d\u3002<\/li>\n<\/ul>\n<p><strong>\u65b9\u6cd5 2\uff1a\u4f7f\u7528\u4ee3\u7801<\/strong><\/p>\n<ul>\n<li>\u5728\u60a8\u7684\u4e3b\u9898\u7684 functions.php \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/li>\n<\/ul>\n<pre>function remove_post_date( $dates ) {\n    unset( $dates['modified'] );\n    return $dates;\n}\nadd_filter( 'get_the_date', 'remove_post_date' );<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u4fdd\u5b58\u6587\u4ef6\u5e76\u4e0a\u4f20\u5230\u60a8\u7684\u7f51\u7ad9\u3002<\/li>\n<\/ul>\n<p><strong>\u65b9\u6cd5 3\uff1a\u624b\u52a8\u7f16\u8f91\u6570\u636e\u5e93<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 phpMyAdmin \u6216\u5176\u4ed6\u6570\u636e\u5e93\u7ba1\u7406\u5de5\u5177\u8fde\u63a5\u5230\u60a8\u7684\u6570\u636e\u5e93\u3002<\/li>\n<li>\u627e\u5230 wp_posts \u8868\u5e76\u6253\u5f00\u5b83\u3002<\/li>\n<li>\u627e\u5230 post_modified \u5217\u5e76\u66f4\u65b0\u5176\u503c\u4e3a\u7a7a\u3002<\/li>\n<li>\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<\/ul>\n<p><strong>\u5907\u6ce8\uff1a<\/strong><\/p>\n<ul>\n<li>\u65b9\u6cd5 1 \u662f\u6700\u7b80\u5355\u548c\u63a8\u8350\u7684\u65b9\u6cd5\u3002<\/li>\n<li>\u65b9\u6cd5 2 \u8981\u6c42\u60a8\u4e86\u89e3 PHP\u3002<\/li>\n<li>\u65b9\u6cd5 3 \u9700\u8981\u60a8\u76f4\u63a5\u7f16\u8f91\u6570\u636e\u5e93\uff0c\u56e0\u6b64\u4e0d\u5efa\u8bae\u975e\u6280\u672f\u4eba\u5458\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7f16\u8f91\u65e5\u671f\u600e\u4e48\u53d6\u6d88\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>wordpress \u7f16\u8f91\u65e5\u671f\u53ef\u4ee5\u901a\u8fc7\u4e09\u79cd\u65b9\u6cd5\u53d6\u6d88\uff1a1. \u5b89\u88c5 enable post date disable \u63d2\u4ef6\uff1b2. \u5728 functions.php \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee3\u7801\uff1b3. \u624b\u52a8\u7f16\u8f91 wp_posts \u8868\u4e2d\u7684 post_modified \u5217\u3002 \u5982\u4f55\u53d6\u6d88 WordPress \u7f16\u8f91\u65e5\u671f WordPress \u4f1a\u81ea\u52a8\u4e3a\u5df2\u53d1\u5e03\u7684\u535a\u5ba2\u6587\u7ae0\u6dfb\u52a0\u7f16\u8f91\u65e5\u671f\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u9690\u85cf\u6216\u53d6\u6d88\u6b64\u65e5\u671f\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u53d6\u6d88 WordPress \u7f16\u8f91\u65e5\u671f\uff1a \u65b9\u6cd5 1\uff1a\u4f7f\u7528\u63d2\u4ef6 \u5b89\u88c5\u548c\u6fc0\u6d3b Enable Post Date Disable \u63d2\u4ef6\u3002 \u8f6c\u5230\u201c\u8bbe\u7f6e\u201d&gt;\u201cEnable Post Date Disable\u201d\u3002 \u52fe\u9009\u201c\u7981\u7528\u6240\u6709\u6587\u7ae0\u65e5\u671f\u201d\u6846\u3002 \u5355\u51fb\u201c\u4fdd\u5b58\u66f4\u6539\u201d\u3002 \u65b9\u6cd5 2\uff1a\u4f7f\u7528\u4ee3\u7801 \u5728\u60a8\u7684\u4e3b\u9898\u7684 functions.php \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a function remove_post_date( $dates ) { unset( $dates[&#8216;modified&#8217;] ); return $dates; } add_filter( &#8216;get_the_date&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-28902","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=28902"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28902\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=28902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=28902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=28902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}