{"id":3870,"date":"2025-06-12T05:50:19","date_gmt":"2025-06-11T21:50:19","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/3870.html"},"modified":"2025-06-12T05:50:19","modified_gmt":"2025-06-11T21:50:19","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e7%ae%a1%e7%90%86%e6%a0%8f%e6%98%be%e7%a4%bawordpress%e5%8d%9a%e5%ae%a2%e7%9a%84%e6%97%b6%e9%97%b4","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/3870.html","title":{"rendered":"\u5982\u4f55\u5728\u7ba1\u7406\u680f\u663e\u793aWordPress\u535a\u5ba2\u7684\u65f6\u95f4"},"content":{"rendered":"<div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--1\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/dyA-1-400x300.jpg\" alt=\"Bug&#32534;&#35793;&#29422;\" class=\"wp-image-1842\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">Bug&#32534;&#35793;&#29422;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#35201;&#35753;WordPress&#21338;&#23458;&#22312;&#31649;&#29702;&#26639;&#26174;&#31034;&#26102;&#38388;&#65292;&#20320;&#38656;&#35201;&#32534;&#36753;&#20320;&#30340;&#20027;&#39064;&#30340;&#27169;&#26495;&#25991;&#20214;&#65292;&#36890;&#24120;&#36825;&#20123;&#25991;&#20214;&#20301;&#20110;<code>wp-content\/themes\/your-theme-name\/<\/code>&#30446;&#24405;&#19979;&#12290;<\/p>\n<p>&#39318;&#20808;&#65292;&#25214;&#21040;&#20320;&#30340;&#20027;&#39064;&#30340;&ldquo;footer.php&rdquo;&#25991;&#20214;&#65288;&#36825;&#20010;&#25991;&#20214;&#36890;&#24120;&#20301;&#20110;&#20027;&#39064;&#26681;&#30446;&#24405;&#19979;&#30340;<code>footer.php<\/code>&#65289;&#65292;&#25171;&#24320;&#23427;&#24182;&#28155;&#21152;&#20197;&#19979;&#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;?php echo date('Y-m-d H:i:s'); ?&gt;<\/code><\/pre>\n<p>&#36825;&#27573;&#20195;&#30721;&#20250;&#36755;&#20986;&#24403;&#21069;&#26085;&#26399;&#21644;&#26102;&#38388;&#12290;<\/p>\n<p>&#28982;&#21518;&#65292;&#20445;&#23384;&#20320;&#30340;&#26356;&#25913;&#12290;&#22914;&#26524;&#20320;&#24050;&#32463;&#23433;&#35013;&#20102;&#25554;&#20214;&#65292;&#21487;&#33021;&#38656;&#35201;&#20808;&#31105;&#29992;&#23427;&#65292;&#22240;&#20026;&#26377;&#20123;&#25554;&#20214;&#21487;&#33021;&#20250;&#35206;&#30422;&#25110;&#24178;&#25200;&#20027;&#39064;&#30340;&#27169;&#26495;&#25991;&#20214;&#12290;<\/p>\n<p>&#26368;&#21518;&#65292;&#22312;&#27983;&#35272;&#22120;&#20013;&#35775;&#38382;&#20320;&#30340;&#32593;&#31449;&#65292;&#20320;&#24212;&#35813;&#20250;&#22312;&#39029;&#38754;&#24213;&#37096;&#30475;&#21040;&#24403;&#21069;&#30340;&#26085;&#26399;&#21644;&#26102;&#38388;&#12290;<\/p>\n<p>&#36825;&#26159;&#19968;&#20010;&#31616;&#21333;&#30340;&#20363;&#23376;&#65292;&#23454;&#38469;&#19978;&#20320;&#21487;&#20197;&#26681;&#25454;&#33258;&#24049;&#30340;&#38656;&#27714;&#20462;&#25913;&#26102;&#38388;&#26684;&#24335;&#12290;&#20363;&#22914;&#65292;&#22914;&#26524;&#20320;&#24819;&#21482;&#26174;&#31034;&#24180;&#20221;&#12289;&#26376;&#20221;&#12289;&#26085;&#26399;&#21644;&#26102;&#38388;&#65292;&#21487;&#20197;&#20462;&#25913;&#20195;&#30721;&#20026;&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;?php echo date('Y-m-d H:i'); ?&gt;<\/code><\/pre>\n<p>&#24076;&#26395;&#36825;&#33021;&#24110;&#21040;&#20320;&#65281;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--2\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/zp-400x300.jpg\" alt=\"&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;\" class=\"wp-image-1849\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312;WordPress&#20013;&#65292;&#24744;&#21487;&#20197;&#36890;&#36807;&#20197;&#19979;&#27493;&#39588;&#26469;&#35774;&#32622;&#26102;&#38388;&#26174;&#31034;&#22312;&#31649;&#29702;&#26639;&#65306;<\/p>\n<h3>&#27493;&#39588; 1: &#30830;&#23450;&#26085;&#26399;&#21644;&#26102;&#38388;<\/h3>\n<p>&#39318;&#20808;&#65292;&#22312;&#24744;&#30340;WordPress&#20027;&#39064;&#25991;&#20214;&#22841;&#19979;&#25214;&#21040;&#19968;&#20010;&#21517;&#20026;<code>functions.php<\/code>&#25110;<code>wp-config.php<\/code>&#30340;&#25991;&#20214;&#12290;&#22914;&#26524;&#24744;&#20351;&#29992;&#30340;&#26159;WordPress&#26680;&#24515;&#29256;&#26412;&#65288;&#22914;2.8&#25110;3.0&#65289;&#65292;&#21017;&#35813;&#25991;&#20214;&#36890;&#24120;&#20301;&#20110;<code>\/wp-content\/themes\/your-theme\/wp-includes\/functions.php<\/code>&#25110;<code>\/wp-config.php<\/code>&#12290;<\/p>\n<p>&#25171;&#24320;&#36825;&#20123;&#25991;&#20214;&#24182;&#26597;&#25214;&#20197;&#19979;&#20195;&#30721;&#27573;&#65306;<\/p>\n<pre><code class=\"language-php\">\/\/ Add the date and time to the header.\nfunction add_date_time_to_header() {\n    echo '&lt;style type=\"text\/css\"&gt;.post-date { display:none; } .post-time { display:none; }&lt;\/style&gt;';\n}\nadd_action('wp_head', 'add_date_time_to_header');<\/code><\/pre>\n<p>&#23558;&#27492;&#20195;&#30721;&#28155;&#21152;&#21040;&#30456;&#24212;&#30340;&#25991;&#20214;&#20013;&#65292;&#28982;&#21518;&#20445;&#23384;&#26356;&#25913;&#24182;&#20851;&#38381;&#32534;&#36753;&#22120;&#12290;<\/p>\n<h3>&#27493;&#39588; 2: &#35774;&#32622;&#26174;&#31034;&#20301;&#32622;<\/h3>\n<p>&#25509;&#19979;&#26469;&#65292;&#35201;&#30830;&#20445;&#26085;&#26399;&#21644;&#26102;&#38388;&#20986;&#29616;&#22312;&#27491;&#30830;&#30340;&#37096;&#20998;&#12290;&#22312;<code>functions.php<\/code>&#25110;<code>wp-config.php<\/code>&#25991;&#20214;&#20013;&#25214;&#21040;&#20197;&#19979;&#20195;&#30721;&#27573;&#65306;<\/p>\n<pre><code class=\"language-php\">\/\/ Set up a custom post format for your theme.\nregister_post_type( 'custom-format', array(\n    'labels' =&gt; array(\n        'name' =&gt; _x( 'Custom Format', 'Post Type General Name', 'theme-name' ),\n        'singular_name' =&gt; _x( 'Custom Format', 'Post Type Singular Name', 'theme-name' ),\n        'menu_name' =&gt; __( 'Custom Formats' ),\n        'all_items' =&gt; __( 'All Custom Formats' ),\n        'edit_item' =&gt; __( 'Edit Custom Format' ),\n        'view_item' =&gt; __( 'View Custom Format' ),\n        'search_items' =&gt; __( 'Search Custom Formats' ),\n        'not_found' =&gt; __( 'No Custom Formats found.', 'theme-name' ),\n        'not_found_in_trash' =&gt; __( 'No Custom Formats found in Trash.', 'theme-name' )\n    ),\n    'publicly_queryable' =&gt; true,\n    'show_ui' =&gt; true,\n    'show_in_menu' =&gt; true,\n    'has_archive' =&gt; false,\n    'rewrite' =&gt; array( 'slug' =&gt; 'custom-formats' ),\n    'menu_position' =&gt; 5,\n    'supports' =&gt; array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments', 'revisions' ),\n    'taxonomies' =&gt; array( 'category' ),\n    'hierarchical' =&gt; true,\n));<\/code><\/pre>\n<p>&#22312;&#36825;&#20010;&#20363;&#23376;&#20013;&#65292;&#25105;&#20204;&#20026;&#19968;&#20010;&#26032;&#30340;&#33258;&#23450;&#20041;&#26684;&#24335;&#35774;&#32622;&#20102;&#26631;&#39064;&#12289;&#25688;&#35201;&#21644;&#20998;&#31867;&#31561;&#26631;&#31614;&#12290;&#23558;&#36825;&#20010;&#20195;&#30721;&#25918;&#22312;<code>functions.php<\/code>&#25110;<code>wp-config.php<\/code>&#25991;&#20214;&#20013;&#12290;<\/p>\n<h3>&#27493;&#39588; 3: &#22312;&#31649;&#29702;&#30028;&#38754;&#20013;&#26174;&#31034;&#26085;&#26399;&#21644;&#26102;&#38388;<\/h3>\n<p>&#29616;&#22312;&#65292;&#24744;&#38656;&#35201;&#22312;&#31649;&#29702;&#38754;&#26495;&#19978;&#26174;&#31034;&#36825;&#20010;&#33258;&#23450;&#20041;&#26684;&#24335;&#12290;&#35775;&#38382;<code>&#21518;&#21488; &gt; &#29992;&#25143; &gt; &#29992;&#25143;&#31649;&#29702;<\/code>&#39029;&#38754;&#65292;&#36873;&#25321;&ldquo;&#33258;&#23450;&#20041;&#26684;&#24335;&rdquo;&#20316;&#20026;&#26032;&#21019;&#24314;&#30340;&#33258;&#23450;&#20041;&#26684;&#24335;&#12290;&#22312;&#31649;&#29702;&#38754;&#26495;&#19978;&#28857;&#20987;&#21491;&#19978;&#35282;&#30340;&ldquo;&#26085;&#26399;&#19982;&#26102;&#38388;&rdquo;&#65292;&#28982;&#21518;&#20174;&#24377;&#20986;&#33756;&#21333;&#20013;&#36873;&#25321;&ldquo;&#33258;&#23450;&#20041;&#26684;&#24335;&rdquo;&#12290;<\/p>\n<p>&#22312;&#26032;&#20986;&#29616;&#30340;&#39029;&#38754;&#20013;&#65292;&#24744;&#21487;&#20197;&#30475;&#21040;&#33258;&#23450;&#20041;&#26684;&#24335;&#21517;&#31216;&#26049;&#36793;&#26377;&#19968;&#20010;&#32511;&#33394;&#30340;&#23567;&#31661;&#22836;&#12290;&#28857;&#20987;&#23427;&#65292;&#28982;&#21518;&#36873;&#25321;&#24744;&#24819;&#35201;&#26174;&#31034;&#30340;&#26085;&#26399;&#21644;&#26102;&#38388;&#12290;<\/p>\n<p>&#33267;&#27492;&#65292;&#26085;&#26399;&#21644;&#26102;&#38388;&#24050;&#32463;&#25104;&#21151;&#26174;&#31034;&#22312;&#20102;&#31649;&#29702;&#26639;&#20013;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; &#35201;&#35753;WordPress&#21338;&#23458;&#22312;&#31649;&#29702;&#26639;&#26174;&#31034;&#26102;&#38388;&#65292;&#20320;&#38656;&#038;#3..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2107,2106],"tuisongtax":[],"class_list":["post-3870","post","type-post","status-publish","format-standard","hentry","category-wpdt","tag-cjyy","tag-cjzn"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3870","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/comments?post=3870"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3870\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=3870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=3870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=3870"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=3870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}