{"id":2395,"date":"2025-06-11T01:48:17","date_gmt":"2025-06-10T17:48:17","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/2395.html"},"modified":"2025-06-11T01:48:17","modified_gmt":"2025-06-10T17:48:17","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-wordpress-%e5%8c%ba%e5%9d%97%e4%b9%8b%e9%97%b4%e6%b7%bb%e5%8a%a0%e6%88%96%e7%a7%bb%e9%99%a4%e7%a9%ba%e7%99%bd%e7%a9%ba%e9%97%b4%ef%bc%884-%e7%a7%8d%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/2395.html","title":{"rendered":"\u5982\u4f55\u5728 WordPress \u533a\u5757\u4e4b\u95f4\u6dfb\u52a0\u6216\u79fb\u9664\u7a7a\u767d\u7a7a\u95f4\uff084 \u79cd\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 &#20013;&#65292;&#22914;&#26524;&#20320;&#24076;&#26395;&#22312;&#21306;&#22359;&#20043;&#38388;&#28155;&#21152;&#25110;&#31227;&#38500;&#31354;&#30333;&#31354;&#38388;&#65292;&#21487;&#20197;&#37319;&#29992;&#20197;&#19979;&#20960;&#31181;&#26041;&#27861;&#65306;<\/p>\n<h3>&#26041;&#27861;&#19968;&#65306;&#20351;&#29992; <code>wp-blocks<\/code> &#21644; <code>wp-components<\/code><\/h3>\n<ol>\n<li>\n<p><strong>&#25554;&#20837;&#31354;&#30333;&#21306;&#22359;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#25171;&#24320;&#20320;&#30340;&#32534;&#36753;&#22120;&#12290;<\/li>\n<li>&#28857;&#20987;&#21491;&#19978;&#35282;&#30340;&ldquo;&#25554;&#20837;&rdquo;&#25353;&#38062;&#65292;&#36873;&#25321;&ldquo;&#31354;&#30333;&#21306;&#22359;&rdquo;&#12290;<\/li>\n<li>&#20320;&#21487;&#20197;&#36890;&#36807;&#25302;&#21160;&#28369;&#22359;&#26469;&#35843;&#25972;&#31354;&#30333;&#21306;&#22359;&#30340;&#22823;&#23567;&#12290;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#35843;&#25972;&#31354;&#30333;&#21306;&#22359;&#20301;&#32622;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#22312;&#32534;&#36753;&#22120;&#20013;&#25214;&#21040;&#31354;&#30333;&#21306;&#22359;&#30340;&#20301;&#32622;&#12290;<\/li>\n<li>&#20351;&#29992;&#40736;&#26631;&#24748;&#20572;&#22312;&#31354;&#30333;&#21306;&#22359;&#19978;&#26041;&#65292;&#28857;&#20987;&#21491;&#20391;&#30340;&#23567;&#31661;&#22836;&#20197;&#26597;&#30475;&#21644;&#35843;&#25972;&#20854;&#23646;&#24615;&#12290;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#31227;&#38500;&#31354;&#30333;&#21306;&#22359;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#22914;&#26524;&#19981;&#38656;&#35201;&#26576;&#20010;&#31354;&#30333;&#21306;&#22359;&#65292;&#21482;&#38656;&#23558;&#20854;&#25302;&#21040;&#21478;&#19968;&#20010;&#21306;&#22359;&#19978;&#26041;&#21363;&#21487;&#21024;&#38500;&#23427;&#12290;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>&#31034;&#20363;&#20195;&#30721;<\/h3>\n<pre><code class=\"language-php\">\/\/ &#25554;&#20837;&#31354;&#30333;&#21306;&#22359;\nadd_filter('render_block', 'insert_blank_block', 99, 3);\nfunction insert_blank_block($content, $block, $context) {\n    \/\/ &#20551;&#35774;&#25105;&#20204;&#27491;&#22312;&#25554;&#20837;&#31354;&#30333;&#21306;&#22359;\n    if ($block['name'] == 'Blank') {\n        return '';\n    }\n    return $content;\n}<\/code><\/pre>\n<h3>&#27493;&#39588;&#35828;&#26126;<\/h3>\n<ol>\n<li>&#25171;&#24320;&#24744;&#30340; WordPress &#32534;&#36753;&#22120;&#12290;<\/li>\n<li>&#22312;&#39029;&#38754;&#39030;&#37096;&#30340;&#32534;&#36753;&#38754;&#26495;&#20013;&#65292;&#25214;&#21040;&ldquo;&#36807;&#28388;&#22120;&rdquo;&#37096;&#20998;&#12290;<\/li>\n<li>&#28155;&#21152;&#19978;&#36848;&#20195;&#30721;&#29255;&#27573;&#12290;<\/li>\n<li>&#20445;&#23384;&#24182;&#21047;&#26032;&#39029;&#38754;&#12290;<\/li>\n<\/ol>\n<h3>&#25928;&#26524;&#23637;&#31034;<\/h3>\n<ul>\n<li>&#24403;&#24744;&#25554;&#20837;&#19968;&#20010;&#31354;&#30333;&#21306;&#22359;&#26102;&#65292;&#31995;&#32479;&#20250;&#33258;&#21160;&#28210;&#26579;&#19968;&#20010;&#31354;&#30340;&#21306;&#22359;&#21306;&#22495;&#65292;&#24744;&#21487;&#20197;&#22312;&#27492;&#22788;&#25918;&#32622;&#20219;&#20309;&#20869;&#23481;&#12290;<\/li>\n<li>&#24744;&#21487;&#20197;&#36890;&#36807;&#35843;&#25972;&#31354;&#30333;&#21306;&#22359;&#30340;&#23646;&#24615;&#26469;&#25913;&#21464;&#20854;&#23485;&#24230;&#12289;&#39640;&#24230;&#31561;&#65292;&#20174;&#32780;&#23454;&#29616;&#19981;&#21516;&#30340;&#35270;&#35273;&#25928;&#26524;&#12290;<\/li>\n<\/ul>\n<h3>&#26041;&#27861;&#20108;&#65306;&#20351;&#29992; CSS &#26679;&#24335;<\/h3>\n<ol>\n<li>\n<p><strong>&#25554;&#20837;&#31354;&#30333;&#21306;&#22359;<\/strong>&#65306;<\/p>\n<ul>\n<li>&#22914;&#21069;&#25991;&#25152;&#36848;&#65292;&#25171;&#24320;&#32534;&#36753;&#22120;&#24182;&#25554;&#20837;&#31354;&#30333;&#21306;&#22359;&#12290;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>&#24212;&#29992; CSS &#38544;&#34255;&#31354;&#30333;&#21306;&#22359;<\/strong>&#65306;<\/p>\n<ul>\n<li>\n<p>&#22312;&#31354;&#30333;&#21306;&#22359;&#19979;&#26041;&#65292;&#28155;&#21152;&#20197;&#19979; CSS &#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-css\">.no-padding { padding: 0 !important; }<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>&#36825;&#23558;&#38544;&#34255;&#31354;&#30333;&#21306;&#22359;&#30340;&#36793;&#36317;&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#31227;&#38500;&#31354;&#30333;&#21306;&#22359;<\/strong>&#65306;<\/p>\n<ul>\n<li>\n<p>&#20026;&#20102;&#31227;&#38500;&#31354;&#30333;&#21306;&#22359;&#65292;&#24744;&#21487;&#20197;&#22312; CSS &#25991;&#20214;&#20013;&#23450;&#20041;&#19968;&#20010;&#31867;&#21517;&#65292;&#20363;&#22914; <code>.hidden-blank-block<\/code>&#65292;&#28982;&#21518;&#22312;&#27169;&#26495;&#25991;&#20214;&#20013;&#28155;&#21152;&#35813;&#31867;&#21517;&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;div class=\"hidden-blank-block\"&gt;\n &lt;!-- &#30333;&#31354;&#30333;&#21306;&#22359;&#20869;&#23481; --&gt;\n&lt;\/div&gt;<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>&#31034;&#20363;&#20195;&#30721;<\/h3>\n<pre><code class=\"language-php\">\/\/ &#24212;&#29992; CSS &#38544;&#34255;&#31354;&#30333;&#21306;&#22359;\nadd_action('admin_head', 'apply_css_to_hide_blank_blocks');\nfunction apply_css_to_hide_blank_blocks() {\n    ?&gt;\n    &lt;style type=\"text\/css\"&gt;\n        .no-padding { padding: 0 !important; }\n    &lt;\/style&gt;\n    &lt;?php\n}\n\n\/\/ &#31227;&#38500;&#31354;&#30333;&#21306;&#22359;\nadd_shortcode('remove_blank_block', 'shortcode_remove_blank_block');\nfunction shortcode_remove_blank_block() {\n    ob_start();\n    echo '&lt;div class=\"hidden-blank-block\"&gt;';\n    do_shortcode('[blank]');\n    echo '&lt;\/div&gt;';\n    return ob_get_clean();\n}<\/code><\/pre>\n<h3>&#27493;&#39588;&#35828;&#26126;<\/h3>\n<ol>\n<li>&#23558;&#19978;&#36848;&#20195;&#30721;&#38468;&#21152;&#21040; WordPress &#30340; admin_head &#20989;&#25968;&#20013;&#65292;&#30830;&#20445;&#22312;&#32534;&#36753;&#31354;&#30333;&#21306;&#22359;&#20043;&#21069;&#25191;&#34892;&#12290;<\/li>\n<li>&#22312;&#27169;&#26495;&#25991;&#20214;&#20013;&#21019;&#24314;&#19968;&#20010;&#21517;&#20026; <code>remove_blank_block<\/code> &#30340;&#30701;&#20195;&#30721;&#12290;<\/li>\n<li>&#22312;&#32534;&#36753;&#31354;&#30333;&#21306;&#22359;&#26102;&#65292;&#20351;&#29992; <code>[remove_blank_block]<\/code> &#20195;&#26367;&#40664;&#35748;&#30340;&#31354;&#30333;&#21306;&#22359;&#12290;<\/li>\n<\/ol>\n<h3>&#25928;&#26524;&#23637;&#31034;<\/h3>\n<ul>\n<li>&#30333;&#31354;&#30333;&#21306;&#22359;&#34987;&#38544;&#34255;&#65292;&#20165;&#22312;&#38656;&#35201;&#26174;&#31034;&#26102;&#25165;&#20986;&#29616;&#12290;<\/li>\n<li>&#31227;&#38500;&#31354;&#30333;&#21306;&#22359;&#21518;&#65292;&#31354;&#30333;&#21306;&#22359;&#20250;&#34987;&#23436;&#20840;&#31227;&#38500;&#65292;&#27809;&#26377;&#39069;&#22806;&#30340;&#31354;&#30333;&#21306;&#22495;&#12290;<\/li>\n<\/ul>\n<p>&#36825;&#20123;&#26041;&#27861;&#21487;&#20197;&#24110;&#21161;&#20320;&#22312; WordPress &#20013;&#28789;&#27963;&#22320;&#25511;&#21046;&#21306;&#22359;&#20043;&#38388;&#30340;&#38388;&#36317;&#21644;&#24067;&#23616;&#12290;&#26681;&#25454;&#20855;&#20307;&#38656;&#27714;&#36873;&#25321;&#21512;&#36866;&#30340;&#26041;&#27861;&#36827;&#34892;&#25805;&#20316;&#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>&#22312; WordPress &#20013;&#28155;&#21152;&#25110;&#31227;&#38500;&#31354;&#30333;&#31354;&#38388;&#30340;&#26041;&#27861;<\/h3>\n<p>&#22312;WordPress&#20013;&#65292;&#25105;&#20204;&#21487;&#20197;&#20351;&#29992;&#22810;&#31181;&#26041;&#24335;&#26469;&#25511;&#21046;&#21306;&#22359;&#20043;&#38388;&#30340;&#38388;&#36317;&#21644;&#24067;&#23616;&#12290;&#36825;&#37324;&#25105;&#20204;&#23558;&#20171;&#32461;&#22235;&#31181;&#19981;&#21516;&#30340;&#26041;&#27861;&#65306;<\/p>\n<h4>&#26041;&#27861;&#19968;&#65306;&#20351;&#29992; <code>wp_block_editor_css<\/code> &#32534;&#36753;&#22120;<\/h4>\n<p><strong>&#27493;&#39588; 1:<\/strong> &#30830;&#20445;&#20320;&#24050;&#23433;&#35013;&#24182;&#28608;&#27963;&#20102; <code>wp-block-editor<\/code> &#21644; <code>wp-element<\/code>&#12290;<\/p>\n<pre><code class=\"language-bash\">cd wp-content\/plugins\/\ngit clone https:\/\/github.com\/WordPress\/Elementor.git\ncd Elementor\ngit checkout main\nnpm install --prefix wp-content\/themes\/mytheme<\/code><\/pre>\n<p><strong>&#27493;&#39588; 2:<\/strong> &#21019;&#24314;&#19968;&#20010;&#21517;&#20026; <code>mytheme-custom.css<\/code> &#30340;&#26032;&#25991;&#20214;&#24182;&#22312;&#20854;&#20013;&#28155;&#21152;&#20197;&#19979; CSS &#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-css\">\/* &#28155;&#21152;&#26679;&#24335; *\/\n.block__separator {\n    height: 0;\n}<\/code><\/pre>\n<p><strong>&#27493;&#39588; 3:<\/strong> &#22312;&#20320;&#30340;&#20027;&#39064;&#30340; <code>functions.php<\/code> &#25991;&#20214;&#20013;&#28155;&#21152;&#20197;&#19979; JavaScript &#20195;&#30721;&#20197;&#21551;&#29992; <code>wp_block_editor_css<\/code>:<\/p>\n<pre><code class=\"language-php\">add_theme_support( 'editor-styles', [\n    'custom_styles' =&gt; [\n        'block_separator_height' =&gt; true,\n    ],\n] );<\/code><\/pre>\n<p><strong>&#27493;&#39588; 4:<\/strong> &#26356;&#26032;&#20320;&#30340;&#25554;&#20214;&#35774;&#32622;&#20197;&#21551;&#29992;&#32534;&#36753;&#22120;&#26679;&#24335;&#21151;&#33021;:<\/p>\n<pre><code class=\"language-php\">function mytheme_custom_styles() {\n    add_action( 'admin_head', 'mytheme_custom_styles_admin_head' );\n    add_action( 'admin_footer', 'mytheme_custom_styles_admin_footer' );\n}\n\nfunction mytheme_custom_styles_admin_head() {\n    echo '&lt;style type=\"text\/css\"&gt;';\n    echo '.wp-block-separator {height: 0;}&lt;\/style&gt;';\n    echo '&lt;\/style&gt;';\n}\n\nfunction mytheme_custom_styles_admin_footer() {\n    echo '&lt;\/style&gt;';\n}<\/code><\/pre>\n<p><strong>&#27493;&#39588; 5:<\/strong> &#23558;&#36825;&#20123;&#26356;&#25913;&#24212;&#29992;&#21040;&#20320;&#30340;&#32593;&#31449;&#19978;&#24182;&#27979;&#35797;&#21306;&#22359;&#38388;&#30340;&#38388;&#36317;&#26159;&#21542;&#27491;&#24120;&#12290;<\/p>\n<h4>&#26041;&#27861;&#20108;&#65306;&#20351;&#29992; <code>wpb_remove_plugin_from_editing_area<\/code> &#20989;&#25968;<\/h4>\n<p><strong>&#27493;&#39588; 1:<\/strong> &#39318;&#20808;&#65292;&#30830;&#20445;&#20320;&#30340;&#20027;&#39064;&#24050;&#32463;&#21253;&#21547;&#20102;&#19968;&#20010;&#21487;&#20197;&#20462;&#25913;&#21306;&#22359;&#20301;&#32622;&#30340;&#25554;&#20214;&#65292;&#20363;&#22914; <code>Block Editor Positioner<\/code>.<\/p>\n<pre><code class=\"language-bash\">cd wp-content\/plugins\/block-editor-positioner\ncomposer update<\/code><\/pre>\n<p><strong>&#27493;&#39588; 2:<\/strong> &#21019;&#24314;&#19968;&#20010;&#21517;&#20026; <code>positioner.js<\/code> &#30340;&#26032;&#25991;&#20214;&#24182;&#28155;&#21152;&#20197;&#19979;&#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-javascript\">(function($) {\n\n    $.fn.wpbe_remove_plugin = function(pluginName) {\n        return this.each(function() {\n            var $this = $(this);\n            if (!$this.data('removePlugin')) {\n                $this.data('removePlugin', new Object());\n            }\n            $this.data('removePlugin').pluginName = pluginName;\n\n            \/\/ Remove the block from the editor area.\n            $this.removeAttr('data-block');\n        });\n    };\n\n})(jQuery);\n\n$(document).ready(function() {\n    $('.wp-block').wpbe_remove_plugin('Your Plugin Name Here');\n});<\/code><\/pre>\n<p><strong>&#27493;&#39588; 3:<\/strong> &#23558;&#19978;&#36848;&#20195;&#30721;&#28155;&#21152;&#21040;&#20320;&#30340;&#20027;&#39064;&#30340; <code>functions.php<\/code> &#25991;&#20214;&#20013;&#12290;<\/p>\n<p><strong>&#27493;&#39588; 4:<\/strong> &#26356;&#26032;&#25554;&#20214;&#35774;&#32622;&#20197;&#21551;&#29992;&#32534;&#36753;&#22120;&#26679;&#24335;&#21151;&#33021;:<\/p>\n<pre><code class=\"language-php\">function mytheme_custom_styles() {\n    add_action( 'admin_head', 'mytheme_custom_styles_admin_head' );\n    add_action( 'admin_footer', 'mytheme_custom_styles_admin_footer' );\n}\n\nfunction mytheme_custom_styles_admin_head() {\n    echo '&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@wordpress\/block-editor@7.6\/dist\/editors\/positioner.min.js\"&gt;&lt;\/script&gt;';\n}\n\nfunction mytheme_custom_styles_admin_footer() {\n    echo '&lt;\/script&gt;';\n}<\/code><\/pre>\n<p><strong>&#27493;&#39588; 5:<\/strong> &#23558;&#36825;&#20123;&#26356;&#25913;&#24212;&#29992;&#21040;&#20320;&#30340;&#32593;&#31449;&#19978;&#24182;&#27979;&#35797;&#21306;&#22359;&#38388;&#30340;&#38388;&#36317;&#26159;&#21542;&#27491;&#24120;&#12290;<\/p>\n<h4>&#26041;&#27861;&#19977;&#65306;&#20351;&#29992;&#33258;&#23450;&#20041; HTML &#26679;&#24335;<\/h4>\n<p><strong>&#27493;&#39588; 1:<\/strong> &#21019;&#24314;&#19968;&#20010;&#21517;&#20026; <code>mytheme-custom.css<\/code> &#30340;&#26032;&#25991;&#20214;&#24182;&#22312;&#20854;&#20013;&#28155;&#21152;&#20197;&#19979; CSS &#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-css\">.block__separator {\n    height: 0px !important;\n}<\/code><\/pre>\n<p><strong>&#27493;&#39588; 2:<\/strong> &#22312;&#20320;&#30340;&#20027;&#39064;&#30340; <code>functions.php<\/code> &#25991;&#20214;&#20013;&#28155;&#21152;&#20197;&#19979; JavaScript &#20195;&#30721;&#20197;&#21551;&#29992;&#33258;&#23450;&#20041;&#26679;&#24335;&#21151;&#33021;:<\/p>\n<pre><code class=\"language-php\">add_theme_support( 'editor-style-override', [\n    'custom_style_overrides' =&gt; [\n        'block_separator_height' =&gt; '0px',\n    ],\n] );<\/code><\/pre>\n<p><strong>&#27493;&#39588; 3:<\/strong> &#26356;&#26032;&#25554;&#20214;&#35774;&#32622;&#20197;&#21551;&#29992;&#32534;&#36753;&#22120;&#26679;&#24335;&#21151;&#33021;:<\/p>\n<pre><code class=\"language-php\">function mytheme_custom_styles() {\n    add_action( 'admin_head', 'mytheme_custom_styles_admin_head' );\n    add_action( 'admin_footer', 'mytheme_custom_styles_admin_footer' );\n}\n\nfunction mytheme_custom_styles_admin_head() {\n    echo '&lt;style type=\"text\/css\"&gt;';\n    echo '.wp-block-separator {height: 0px !important;} \/* Override default separator height *\/';\n    echo '&lt;\/style&gt;';\n    echo '&lt;\/style&gt;';\n}\n\nfunction mytheme_custom_styles_admin_footer() {\n    echo '&lt;\/style&gt;';\n}<\/code><\/pre>\n<p><strong>&#27493;&#39588; 4:<\/strong> &#23558;&#36825;&#20123;&#26356;&#25913;&#24212;&#29992;&#21040;&#20320;&#30340;&#32593;&#31449;&#19978;&#24182;&#27979;&#35797;&#21306;&#22359;&#38388;&#30340;&#38388;&#36317;&#26159;&#21542;&#27491;&#24120;&#12290;<\/p>\n<h4>&#26041;&#27861;&#22235;&#65306;&#20351;&#29992; <code>wpb_remove_plugin_from_editing_area<\/code> &#20989;&#25968;<\/h4>\n<p><strong>&#27493;&#39588; 1:<\/strong> &#23433;&#35013;&#24182;&#28608;&#27963; <code>Custom Block Separator<\/code> &#25554;&#20214;&#12290;<\/p>\n<pre><code class=\"language-bash\">cd wp-content\/plugins\/\ngit clone https:\/\/github.com\/pjwilkerson\/Custom-Breakpoint-Separator\ncd Custom-Breakpoint-Separator\nnpm install\nnpm run build<\/code><\/pre>\n<p><strong>&#27493;&#39588; 2:<\/strong> &#22312;&#20320;&#30340;&#20027;&#39064;&#30340; <code>functions.php<\/code> &#25991;&#20214;&#20013;&#28155;&#21152;&#20197;&#19979; JavaScript &#20195;&#30721;&#20197;&#21551;&#29992;&#33258;&#23450;&#20041;&#26679;&#24335;&#21151;&#33021;:<\/p>\n<pre><code class=\"language-php\">add_theme_support( 'editors\/custom_breakpoints', [\n    'custom_styles' =&gt; [\n        'block_separator_height' =&gt; false,\n    ],\n] );<\/code><\/pre>\n<p><strong>&#27493;&#39588; 3:<\/strong> &#26356;&#26032;&#25554;&#20214;&#35774;&#32622;&#20197;&#21551;&#29992;&#32534;&#36753;&#22120;&#26679;&#24335;&#21151;&#33021;:<\/p>\n<pre><code class=\"language-php\">function mytheme_custom_styles() {\n    add_action( 'admin_head', 'mytheme_custom_styles_admin_head' );\n    add_action( 'admin_footer', 'mytheme_custom_styles_admin_footer' );\n}\n\nfunction mytheme_custom_styles_admin_head() {\n    echo '&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@wordpress\/blocks-core@latest\/dist\/components\/cbp-plugin.min.js\"&gt;&lt;\/script&gt;';\n}\n\nfunction mytheme_custom_styles_admin_footer() {\n    echo '&lt;\/script&gt;';\n}<\/code><\/pre>\n<p><strong>&#27493;&#39588; 4:<\/strong> &#23558;&#36825;&#20123;&#26356;&#25913;&#24212;&#29992;&#21040;&#20320;&#30340;&#32593;&#31449;&#19978;&#24182;&#27979;&#35797;&#21306;&#22359;&#38388;&#30340;&#38388;&#36317;&#26159;&#21542;&#27491;&#24120;&#12290;<\/p>\n<p>&#36890;&#36807;&#20197;&#19978;&#20960;&#31181;&#26041;&#27861;&#65292;&#20320;&#21487;&#20197;&#36731;&#26494;&#22320;&#22312;WordPress&#20013;&#28155;&#21152;&#25110;&#31227;&#38500;&#31354;&#30333;&#31354;&#38388;&#12290;&#24076;&#26395;&#36825;&#23545;&#20320;&#26377;&#25152;&#24110;&#21161;&#65281;<\/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 &#20013;&#65292;&#22914;&#26524;&#20320;&#24076;&#26395;&#22312;&#21306;&#22359;&#20043;&#38388;&#28155;&#21152;&#038;..<\/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-2395","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\/2395","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=2395"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/2395\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=2395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=2395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=2395"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=2395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}