{"id":3077,"date":"2025-06-11T11:35:36","date_gmt":"2025-06-11T03:35:36","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/3077.html"},"modified":"2025-06-11T11:35:36","modified_gmt":"2025-06-11T03:35:36","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8wordpress%e8%af%84%e8%ae%ba%e4%b8%ad%e7%a6%81%e7%94%a8html%ef%bc%88%e5%bf%ab%e9%80%9f%e7%ae%80%e4%be%bf%e6%96%b9%e6%b3%95%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/3077.html","title":{"rendered":"\u5982\u4f55\u5728WordPress\u8bc4\u8bba\u4e2d\u7981\u7528HTML\uff08\u5feb\u901f\u7b80\u4fbf\u65b9\u6cd5\uff09"},"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>&#22312;WordPress&#35780;&#35770;&#31995;&#32479;&#20013;&#65292;&#26377;&#26102;&#20505;&#25105;&#20204;&#38656;&#35201;&#23545;&#26576;&#20123;&#35780;&#35770;&#36827;&#34892;&#36807;&#28388;&#25110;&#38480;&#21046;&#65292;&#20197;&#30830;&#20445;&#32593;&#31449;&#30340;&#23433;&#20840;&#24615;&#25110;&#32773;&#31526;&#21512;&#29305;&#23450;&#30340;SEO&#31574;&#30053;&#12290;&#20854;&#20013;&#19968;&#31181;&#24120;&#35265;&#30340;&#38656;&#27714;&#23601;&#26159;&#31105;&#27490;&#29992;&#25143;&#22312;&#35780;&#35770;&#20013;&#25554;&#20837;HTML&#26631;&#31614;&#65292;&#36825;&#26679;&#21487;&#20197;&#38450;&#27490;&#24694;&#24847;&#25915;&#20987;&#21644;&#19981;&#36866;&#24403;&#30340;&#35780;&#35770;&#20869;&#23481;&#12290;<\/p>\n<h3>&#35299;&#20915;&#26041;&#26696;&#65306;&#20351;&#29992;<code>comment_text<\/code>&#36807;&#28388;&#22120;<\/h3>\n<p>&#22312;WordPress&#20013;&#65292;&#20320;&#21487;&#20197;&#36890;&#36807;&#20462;&#25913;&#25554;&#20214;&#12289;&#20027;&#39064;&#25110;&#33258;&#23450;&#20041;&#20195;&#30721;&#26469;&#23454;&#29616;&#36825;&#20010;&#21151;&#33021;&#12290;&#19979;&#38754;&#25105;&#23558;&#20171;&#32461;&#19968;&#20010;&#31616;&#21333;&#30340;&#26041;&#27861;&#65292;&#21363;&#20351;&#29992;<code>comment_text<\/code>&#36807;&#28388;&#22120;&#26469;&#31105;&#29992;HTML&#12290;<\/p>\n<h4>&#27493;&#39588;1: &#25554;&#20837;&#20195;&#30721;&#21040;&#20027;&#39064;&#25991;&#20214;<\/h4>\n<p>&#39318;&#20808;&#65292;&#22312;&#20320;&#30340;&#20027;&#39064;&#30340;functions.php&#25991;&#20214;&#20013;&#25554;&#20837;&#20197;&#19979;&#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-php\">function my_comment_text_filter( $text ) {\n    \/\/ &#36825;&#37324;&#25105;&#20204;&#21482;&#26159;&#36820;&#22238;&#21407;&#22987;&#25991;&#26412;&#65292;&#19981;&#36827;&#34892;&#20219;&#20309;&#22788;&#29702;\n    return $text;\n}\nadd_filter('comment_text', 'my_comment_text_filter');<\/code><\/pre>\n<p>&#36825;&#27573;&#20195;&#30721;&#30340;&#20316;&#29992;&#26159;&#22312;&#35780;&#35770;&#25552;&#20132;&#26102;&#65292;&#30452;&#25509;&#36820;&#22238;&#29992;&#25143;&#30340;&#36755;&#20837;&#25991;&#26412;&#65292;&#32780;&#19981;&#20250;&#34987;&#36807;&#28388;&#12290;&#36825;&#23454;&#38469;&#19978;&#23601;&#26159;&#25152;&#35859;&#30340;&ldquo;&#31105;&#29992;HTML&rdquo;&#12290;<\/p>\n<h4>&#27493;&#39588;2: &#27979;&#35797;&#24744;&#30340;&#26356;&#25913;<\/h4>\n<p>&#20445;&#23384;&#25991;&#20214;&#21518;&#65292;&#25171;&#24320;&#19968;&#20010;&#35780;&#35770;&#39029;&#38754;&#24182;&#21457;&#34920;&#19968;&#26465;&#26032;&#30340;&#35780;&#35770;&#12290;&#20320;&#24212;&#35813;&#20250;&#21457;&#29616;&#35780;&#35770;&#20869;&#23481;&#27809;&#26377;&#32463;&#36807;&#20219;&#20309;HTML&#36807;&#28388;&#65292;&#36825;&#26159;&#25105;&#20204;&#30340;&#30446;&#26631;&#12290;<\/p>\n<h3>&#25928;&#26524;&#35828;&#26126;<\/h3>\n<p>&#24403;&#20320;&#21457;&#24067;&#19968;&#26465;&#35780;&#35770;&#26102;&#65292;WordPress&#30340;&#35780;&#35770;&#31995;&#32479;&#20250;&#33258;&#21160;&#35843;&#29992;<code>comment_text<\/code>&#36807;&#28388;&#22120;&#65292;&#24182;&#19988;&#30001;&#20110;&#25105;&#20204;&#22312;&#27492;&#22788;&#27809;&#26377;&#25552;&#20379;&#20219;&#20309;&#39069;&#22806;&#30340;&#20989;&#25968;&#65292;&#25152;&#20197;&#35780;&#35770;&#20869;&#23481;&#23558;&#20197;&#20854;&#21407;&#22987;&#24418;&#24335;&#26174;&#31034;&#20986;&#26469;&#12290;&#36825;&#24847;&#21619;&#30528;&#35780;&#35770;&#32773;&#21487;&#20197;&#22312;&#35780;&#35770;&#20013;&#33258;&#30001;&#22320;&#28155;&#21152;HTML&#26631;&#31614;&#65292;&#20174;&#32780;&#25191;&#34892;&#19968;&#20123;&#28508;&#22312;&#30340;&#24694;&#24847;&#25805;&#20316;&#12290;<\/p>\n<h3>&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ul>\n<li><strong>&#23433;&#20840;&#39118;&#38505;<\/strong>&#65306;&#34429;&#28982;&#36825;&#31181;&#26041;&#27861;&#20801;&#35768;&#29992;&#25143;&#33258;&#30001;&#22320;&#20351;&#29992;HTML&#26631;&#31614;&#65292;&#20294;&#36825;&#20063;&#24847;&#21619;&#30528;&#35780;&#35770;&#20869;&#23481;&#21487;&#33021;&#19981;&#21463;&#25511;&#21046;&#65292;&#21487;&#33021;&#20250;&#24341;&#20837;&#23433;&#20840;&#28431;&#27934;&#12290;<\/li>\n<li><strong>&#26368;&#20339;&#23454;&#36341;<\/strong>&#65306;&#24314;&#35758;&#32467;&#21512;&#20854;&#20182;&#25514;&#26045;&#65292;&#22914;&#20351;&#29992;&#35780;&#35770;&#35745;&#25968;&#22120;&#12289;IP&#40657;&#21517;&#21333;&#31561;&#65292;&#20197;&#22686;&#24378;&#35780;&#35770;&#31995;&#32479;&#30340;&#23433;&#20840;&#24615;&#12290;<\/li>\n<\/ul>\n<p>&#20197;&#19978;&#23601;&#26159;&#19968;&#20010;&#31616;&#21333;&#30340;&#31105;&#29992;HTML&#30340;&#26041;&#27861;&#65292;&#36866;&#29992;&#20110;&#22522;&#26412;&#30340;&#38656;&#27714;&#12290;&#22914;&#26524;&#20320;&#26377;&#26356;&#22797;&#26434;&#30340;&#22330;&#26223;&#38656;&#35201;&#22788;&#29702;&#65292;&#27604;&#22914;&#38656;&#35201;&#36827;&#19968;&#27493;&#30340;HTML&#36807;&#28388;&#25110;&#26356;&#22810;&#30340;&#23433;&#20840;&#26816;&#26597;&#65292;&#35831;&#21442;&#32771;WordPress&#23448;&#26041;&#25991;&#26723;&#25110;&#30456;&#20851;&#31038;&#21306;&#36164;&#28304;&#33719;&#21462;&#26356;&#22810;&#20449;&#24687;&#12290;<\/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<h3>WordPress&#35780;&#35770;&#20013;&#30340;HTML&#31105;&#29992;&#65306;&#19968;&#20010;&#31616;&#21333;&#26131;&#34892;&#30340;&#26041;&#27861;<\/h3>\n<p><strong>&#30446;&#26631;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#31105;&#27490;WordPress&#35780;&#35770;&#20013;&#20351;&#29992;HTML&#26631;&#31614;&#12290;<\/li>\n<\/ul>\n<p><strong>&#27493;&#39588;<\/strong>&#65306;<\/p>\n<ol>\n<li>\n<p><strong>&#35774;&#32622;WordPress&#20027;&#39064;&#21151;&#33021;<\/strong>:<\/p>\n<ul>\n<li>&#30331;&#24405;&#21040;WordPress&#31649;&#29702;&#30028;&#38754;&#12290;<\/li>\n<li>&#25214;&#21040;&ldquo;&#32534;&#36753;&#20027;&#39064;&rdquo;&#37096;&#20998;&#12290;<\/li>\n<li>&#22312;&ldquo;&#21151;&#33021;&rdquo;&#21306;&#22495;&#65292;&#25214;&#21040;&#24182;&#28608;&#27963;&ldquo;&#39640;&#32423;&#21151;&#33021;&rdquo;&#36873;&#39033;&#12290;<\/li>\n<li>&#36873;&#25321;&ldquo;&#21551;&#29992;&#39640;&#32423;&#21151;&#33021;&rdquo;&#12290;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#21019;&#24314;&#33258;&#23450;&#20041;&#20989;&#25968;<\/strong>:<\/p>\n<ul>\n<li>&#21019;&#24314;&#19968;&#20010;&#26032;&#30340;PHP&#25991;&#20214;&#65288;&#20363;&#22914;&#65292;&ldquo;functions.php&rdquo;&#65289;&#65292;&#24182;&#22312;&#20854;&#20013;&#28155;&#21152;&#20197;&#19979;&#20869;&#23481;&#65306;\n<pre><code class=\"language-php\">add_filter( 'comment_text', 'custom_comment_text' );\nfunction custom_comment_text($comment, $depth) {\n if ( ! empty( $comment-&gt;comment_content ) ) {\n     echo '&lt;div class=\"comment-text\"&gt;';\n     echo wpautop( $comment-&gt;comment_content );\n     echo '&lt;\/div&gt;';\n }\n return '';\n}<\/code><\/pre><\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#20462;&#25913;&#35780;&#35770;&#26174;&#31034;&#26041;&#24335;<\/strong>:<\/p>\n<ul>\n<li>&#20462;&#25913;WordPress&#30340;&#20027;&#39064;&#26679;&#24335;&#25110;&#33258;&#23450;&#20041;CSS&#20197;&#38544;&#34255;&#25110;&#31105;&#29992;HTML&#20803;&#32032;&#12290;<\/li>\n<li>\n<p>&#22914;&#26524;&#20320;&#20351;&#29992;&#30340;&#26159;&#20027;&#39064;&#25552;&#20379;&#30340;&#33258;&#23450;&#20041;CSS&#65292;&#35831;&#30830;&#20445;&#22312;<code>functions.php<\/code>&#25991;&#20214;&#20013;&#21253;&#21547;&#20197;&#19979;&#20195;&#30721;&#26469;&#31105;&#29992;HTML&#65306;<\/p>\n<pre><code class=\"language-css\">.comment-text {\n display: none;\n}<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#27979;&#35797;&#19982;&#20248;&#21270;<\/strong>:<\/p>\n<ul>\n<li>&#22312;&#35780;&#35770;&#21306;&#23581;&#35797;&#25554;&#20837;HTML&#65292;&#35266;&#23519;&#26159;&#21542;&#34987;&#27491;&#30830;&#36807;&#28388;&#12290;<\/li>\n<li>&#20351;&#29992;&#27983;&#35272;&#22120;&#24320;&#21457;&#32773;&#24037;&#20855;&#26816;&#26597;&#26159;&#21542;&#26174;&#31034;&#20102;&#39044;&#26399;&#30340;&#20869;&#23481;&#12290;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>&#27880;&#24847;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#36825;&#20010;&#26041;&#27861;&#21487;&#20197;&#38459;&#27490;&#22312;&#35780;&#35770;&#39029;&#38754;&#19978;&#26174;&#31034;&#25152;&#26377;&#30340;HTML&#20803;&#32032;&#65292;&#20294;&#20173;&#28982;&#20801;&#35768;&#29992;&#25143;&#36890;&#36807;&#20854;&#20182;&#36884;&#24452;&#65288;&#22914;JavaScript&#65289;&#35775;&#38382;&#21644;&#22788;&#29702;&#36825;&#20123;&#20803;&#32032;&#12290;<\/li>\n<li>&#19981;&#25512;&#33616;&#38271;&#26399;&#20381;&#36182;&#36825;&#20010;&#25554;&#20214;&#65292;&#22240;&#20026;&#23427;&#21487;&#33021;&#20250;&#23548;&#33268;&#19968;&#20123;&#23433;&#20840;&#38382;&#39064;&#65292;&#29305;&#21035;&#26159;&#23545;&#20110;&#37027;&#20123;&#38656;&#35201;&#22823;&#37327;HTML&#28210;&#26579;&#30340;&#32593;&#31449;&#26469;&#35828;&#12290;<\/li>\n<\/ul>\n<h3>&#31034;&#20363;&#20195;&#30721;&#19982;&#35299;&#37322;&#65306;<\/h3>\n<h4>&#31034;&#20363;1: &#33258;&#23450;&#20041;&#35780;&#35770;&#25991;&#26412;&#36755;&#20986;<\/h4>\n<pre><code class=\"language-php\">add_filter( 'comment_text', 'custom_comment_text' );\nfunction custom_comment_text($comment, $depth) {\n    if ( ! empty( $comment-&gt;comment_content ) ) {\n        echo '&lt;div class=\"comment-text\"&gt;';\n        echo wpautop( $comment-&gt;comment_content );\n        echo '&lt;\/div&gt;';\n    }\n    return '';\n}<\/code><\/pre>\n<p>&#36825;&#20010;&#25554;&#20214;&#36890;&#36807;&#23558;HTML&#20869;&#23481;&#21253;&#35013;&#22312;<code>&lt;div&gt;<\/code>&#26631;&#31614;&#20869;&#26469;&#38450;&#27490;&#23427;&#20204;&#22312;&#35780;&#35770;&#39029;&#38754;&#19978;&#26174;&#31034;&#12290;<\/p>\n<h4>&#31034;&#20363;2: &#20462;&#25913;&#33258;&#23450;&#20041;CSS&#20197;&#31105;&#29992;HTML<\/h4>\n<pre><code class=\"language-css\">.comment-text {\n    display: none;\n}<\/code><\/pre>\n<p>&#36825;&#20250;&#30452;&#25509;&#22312;HTML&#20013;&#31105;&#29992;&#25152;&#26377;&#26174;&#31034;&#22312;&#35780;&#35770;&#21306;&#22495;&#20869;&#30340;HTML&#20803;&#32032;&#12290;<\/p>\n<h3>&#24635;&#32467;<\/h3>\n<p>&#36890;&#36807;&#19978;&#36848;&#27493;&#39588;&#65292;&#20320;&#21487;&#20197;&#26377;&#25928;&#22320;&#22312;WordPress&#35780;&#35770;&#20013;&#31105;&#29992;HTML&#26631;&#31614;&#65292;&#32780;&#26080;&#38656;&#23545;WordPress&#26412;&#36523;&#36827;&#34892;&#37325;&#22823;&#26356;&#25913;&#12290;&#36825;&#31181;&#26041;&#27861;&#36866;&#29992;&#20110;&#22823;&#22810;&#25968;&#23567;&#22411;&#33267;&#20013;&#22411;&#31449;&#28857;&#65292;&#20294;&#23545;&#20110;&#37027;&#20123;&#38656;&#35201;&#22823;&#37327;HTML&#28210;&#26579;&#30340;&#22823;&#22411;&#32593;&#31449;&#21487;&#33021;&#19981;&#22815;&#29702;&#24819;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; &#22312;WordPress&#35780;&#35770;&#31995;&#32479;&#20013;&#65292;&#26377;&#26102;&#20505;&#25105;&#20204;&#38656;&#35201;&#23545;&#038;#2..<\/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":[59],"tuisongtax":[],"class_list":["post-3077","post","type-post","status-publish","format-standard","hentry","category-wpdt","tag-pzjc"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3077","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=3077"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3077\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=3077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=3077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=3077"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=3077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}