{"id":1897,"date":"2025-06-10T17:30:05","date_gmt":"2025-06-10T09:30:05","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/1897.html"},"modified":"2025-06-10T17:30:05","modified_gmt":"2025-06-10T09:30:05","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-wordpress-%e4%b8%ad%e5%be%aa%e7%8e%af%e5%a4%96%e9%83%a8%e6%98%be%e7%a4%ba%e8%87%aa%e5%ae%9a%e4%b9%89%e5%ad%97%e6%ae%b5","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/1897.html","title":{"rendered":"\u5982\u4f55\u5728 WordPress \u4e2d\u5faa\u73af\u5916\u90e8\u663e\u793a\u81ea\u5b9a\u4e49\u5b57\u6bb5"},"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;&#24819;&#35201;&#22312;&#19968;&#20010;&#39029;&#38754;&#25110;&#25991;&#31456;&#20013;&#24490;&#29615;&#26174;&#31034;&#26469;&#33258;&#22806;&#37096;&#25968;&#25454;&#24211;&#30340;&#33258;&#23450;&#20041;&#23383;&#27573;&#25968;&#25454;&#65292;&#20320;&#21487;&#20197;&#20351;&#29992;&#19968;&#20123;&#25554;&#20214;&#21644;&#26041;&#27861;&#26469;&#23454;&#29616;&#36825;&#20010;&#21151;&#33021;&#12290;&#20197;&#19979;&#26159;&#19968;&#20010;&#31616;&#21333;&#30340;&#20363;&#23376;&#65292;&#23637;&#31034;&#22914;&#20309;&#36890;&#36807; <code>WP_Query<\/code> &#21644; PHP &#30340;&#25968;&#32452;&#25805;&#20316;&#26469;&#23454;&#29616;&#36825;&#19968;&#30446;&#26631;&#12290;<\/p>\n<h3>&#27493;&#39588; 1: &#23433;&#35013;&#24182;&#28608;&#27963;&#25152;&#38656;&#25554;&#20214;<\/h3>\n<p>&#39318;&#20808;&#65292;&#30830;&#20445;&#20320;&#24050;&#32463;&#23433;&#35013;&#20102;WordPress&#65292;&#24182;&#19988;&#26377;&#19968;&#20010;&#21487;&#20197;&#26597;&#35810;&#30340;&#25968;&#25454;&#24211;&#65288;&#20363;&#22914;&#65292;MySQL&#65289;&#12290;&#20320;&#38656;&#35201;&#19968;&#20010;&#33021;&#22815;&#25552;&#20379;&#33258;&#23450;&#20041;&#23383;&#27573;&#25968;&#25454;&#30340;&#22806;&#37096;API&#25509;&#21475;&#25110;&#32773;&#25968;&#25454;&#24211;&#34920;&#32467;&#26500;&#12290;&#20551;&#35774;&#25105;&#20204;&#26377;&#36825;&#26679;&#19968;&#20010;&#22806;&#37096;API&#65292;&#23427;&#36820;&#22238;&#20102;&#19968;&#20010;JSON&#26684;&#24335;&#30340;&#25968;&#25454;&#38598;&#12290;<\/p>\n<ol>\n<li>&#30331;&#24405;&#21040;&#20320;&#30340;WordPress&#21518;&#21488;&#12290;<\/li>\n<li>&#25214;&#21040;&ldquo;&#25554;&#20214;&rdquo;&#37096;&#20998;&#65292;&#22312;&#37027;&#37324;&#28857;&#20987;&ldquo;&#28155;&#21152;&#26032;&#25554;&#20214;&rdquo;&#25353;&#38062;&#12290;<\/li>\n<li>&#25628;&#32034;&#24182;&#23433;&#35013;&#19968;&#20010;&#25903;&#25345;PHP&#25193;&#23637;&#30340;&#25554;&#20214;&#65292;&#27604;&#22914; <code>JSON API<\/code> &#25110;&#32773; <code>REST API<\/code> &#25554;&#20214;&#65292;&#20855;&#20307;&#21462;&#20915;&#20110;&#20320;&#30340;&#38656;&#27714;&#12290;<\/li>\n<\/ol>\n<h3>&#27493;&#39588; 2: &#37197;&#32622;&#22806;&#37096;API<\/h3>\n<p>&#19968;&#26086;&#20320;&#23433;&#35013;&#24182;&#21551;&#29992;&#20102;&#19968;&#20010;&#25903;&#25345;API&#30340;&#25554;&#20214;&#65292;&#36890;&#24120;&#23427;&#20250;&#33258;&#21160;&#37197;&#32622;&#22909;&#65292;&#20294;&#20320;&#21487;&#33021;&#38656;&#35201;&#26681;&#25454;&#25554;&#20214;&#30340;&#20855;&#20307;&#35774;&#32622;&#26469;&#35843;&#25972;URL&#12289;API&#23494;&#38053;&#31561;&#20449;&#24687;&#12290;<\/p>\n<h3>&#27493;&#39588; 3: &#32534;&#20889;PHP&#20195;&#30721;<\/h3>\n<p>&#29616;&#22312;&#65292;&#25105;&#20204;&#21487;&#20197;&#32534;&#20889;&#19968;&#20123;PHP&#20195;&#30721;&#26469;&#20174;&#22806;&#37096;API&#33719;&#21462;&#25968;&#25454;&#65292;&#24182;&#23558;&#20854;&#26174;&#31034;&#22312;WordPress&#39029;&#38754;&#19978;&#12290;<\/p>\n<pre><code class=\"language-php\">&lt;?php\n\/\/ &#20551;&#35774;&#25105;&#20204;&#30340;API URL&#20026;&#65306;https:\/\/example.com\/api\/custom_fields?fields=id,name,description&amp;callback=my_custom_fields_callback\n$custom_fields = json_decode(file_get_contents('https:\/\/example.com\/api\/custom_fields'), true);\n\nif ($custom_fields) {\n    \/\/ &#39564;&#35777;&#26159;&#21542;&#25104;&#21151;&#33719;&#21462;&#25968;&#25454;\n    if (isset($custom_fields['error'])) {\n        echo 'Error fetching custom fields: ' . $custom_fields['error'];\n    } else {\n        foreach ($custom_fields as $field) {\n            \/\/ &#20351;&#29992;echo&#36755;&#20986;&#27599;&#20010;&#33258;&#23450;&#20041;&#23383;&#27573;\n            echo '&lt;h2&gt;' . esc_html($field['name']) . '&lt;\/h2&gt;';\n            echo '&lt;p&gt;' . esc_html($field['description']) . '&lt;\/p&gt;';\n        }\n    }\n} else {\n    echo '&#26080;&#27861;&#36830;&#25509;&#21040;&#26381;&#21153;&#22120;';\n}\n?&gt;<\/code><\/pre>\n<h3>&#27493;&#39588; 4: &#23558;PHP&#20195;&#30721;&#38598;&#25104;&#21040;WordPress&#27169;&#26495;&#25991;&#20214;<\/h3>\n<p>&#25214;&#21040;&#20320;&#30340;WordPress&#27169;&#26495;&#25991;&#20214;&#65288;&#36890;&#24120;&#26159;<code>single.php<\/code>&#25110;<code>page.php<\/code>&#65289;&#65292;&#28982;&#21518;&#23558;&#19978;&#38754;&#30340;PHP&#20195;&#30721;&#25554;&#20837;&#21040;&#30456;&#24212;&#30340;&#20301;&#32622;&#65292;&#20197;&#20415;&#23427;&#21487;&#20197;&#22312;&#39029;&#38754;&#19978;&#26174;&#31034;&#33258;&#23450;&#20041;&#23383;&#27573;&#12290;<\/p>\n<h3>&#31034;&#20363;&#25928;&#26524;<\/h3>\n<p>&#24403;&#20320;&#35775;&#38382;&#21547;&#26377;&#19978;&#36848;&#20195;&#30721;&#30340;&#39029;&#38754;&#26102;&#65292;&#20320;&#20250;&#30475;&#21040;&#31867;&#20284;&#20197;&#19979;&#30340;&#20869;&#23481;&#65306;<\/p>\n<pre><code>&lt;h2&gt;Name Field&lt;\/h2&gt;\n&lt;p&gt;This is the description for the name field.&lt;\/p&gt;\n\n&lt;h2&gt;Description Field&lt;\/h2&gt;\n&lt;p&gt;This is the description for the description field.&lt;\/p&gt;<\/code><\/pre>\n<h3>&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ul>\n<li>&#30830;&#20445;&#20320;&#30340;&#20195;&#30721;&#31526;&#21512;WordPress&#30340;&#32531;&#23384;&#26426;&#21046;&#65292;&#21542;&#21017;&#21487;&#33021;&#20250;&#23548;&#33268;&#32467;&#26524;&#19981;&#27491;&#30830;&#12290;<\/li>\n<li>&#26681;&#25454;&#23454;&#38469;&#24773;&#20917;&#35843;&#25972;API&#35831;&#27714;&#21442;&#25968;&#21644;&#22788;&#29702;&#36923;&#36753;&#12290;<\/li>\n<li>&#22914;&#26524;&#33258;&#23450;&#20041;&#23383;&#27573;&#27809;&#26377;&#25353;&#29031;&#39044;&#26399;&#26174;&#31034;&#65292;&#35831;&#26816;&#26597;&#25554;&#20214;&#37197;&#32622;&#21644;&#25968;&#25454;&#26684;&#24335;&#26159;&#21542;&#21305;&#37197;&#12290;<\/li>\n<\/ul>\n<p>&#36890;&#36807;&#20197;&#19978;&#27493;&#39588;&#65292;&#20320;&#24212;&#35813;&#33021;&#22815;&#22312;WordPress&#20013;&#25104;&#21151;&#22320;&#24490;&#29615;&#26174;&#31034;&#26469;&#33258;&#22806;&#37096;API&#30340;&#33258;&#23450;&#20041;&#23383;&#27573;&#25968;&#25454;&#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>&#24490;&#29615;&#26174;&#31034;&#33258;&#23450;&#20041;&#23383;&#27573;&#22312;WordPress&#20013;&#30340;&#27493;&#39588;<\/h3>\n<h4>1. &#21019;&#24314;&#33258;&#23450;&#20041;&#23383;&#27573;<\/h4>\n<p>&#39318;&#20808;&#65292;&#20320;&#38656;&#35201;&#22312;&#20320;&#30340;WordPress&#20027;&#39064;&#25110;&#25554;&#20214;&#20013;&#21019;&#24314;&#19968;&#20010;&#33258;&#23450;&#20041;&#23383;&#27573;&#12290;&#20320;&#21487;&#20197;&#20351;&#29992;<code>&lt;input type=\"text\"&gt;<\/code>&#20803;&#32032;&#26469;&#21019;&#24314;&#25991;&#26412;&#36755;&#20837;&#26694;&#12290;&#20363;&#22914;&#65306;<\/p>\n<pre><code class=\"language-html\">&lt;input type=\"text\" id=\"my_custom_field\"&gt;<\/code><\/pre>\n<p>&#28982;&#21518;&#65292;&#22312;PHP&#25991;&#20214;&#65288;&#22914;<code>functions.php<\/code>&#65289;&#20013;&#28155;&#21152;&#19968;&#20010;&#20989;&#25968;&#26469;&#33719;&#21462;&#36825;&#20010;&#33258;&#23450;&#20041;&#23383;&#27573;&#30340;&#20869;&#23481;&#12290;<\/p>\n<pre><code class=\"language-php\">function get_my_custom_field() {\n    $field_id = 'my_custom_field';\n    return get_post_meta(get_the_ID(), $field_id, true);\n}<\/code><\/pre>\n<h4>2. &#22312;&#27169;&#26495;&#25991;&#20214;&#20013;&#26174;&#31034;&#33258;&#23450;&#20041;&#23383;&#27573;<\/h4>\n<p>&#29616;&#22312;&#65292;&#20320;&#21487;&#20197;&#22312;&#20219;&#20309;&#38656;&#35201;&#30340;&#22320;&#26041;&#25554;&#20837;&#19978;&#36848;&#33258;&#23450;&#20041;&#23383;&#27573;&#30340;&#20540;&#12290;&#20363;&#22914;&#65292;&#22914;&#26524;&#20320;&#24819;&#22312;&#19968;&#20010;&#25991;&#31456;&#39029;&#38754;&#19978;&#26174;&#31034;&#33258;&#23450;&#20041;&#23383;&#27573;&#30340;&#20869;&#23481;&#65292;&#21487;&#20197;&#36825;&#26679;&#25805;&#20316;&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;\n    &lt;div class=\"post-meta\"&gt;\n        &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;\/h3&gt;\n        &lt;span&gt;&lt;?php the_content(); ?&gt;&lt;\/span&gt;\n    &lt;\/div&gt;\n    &lt;?php get_template_part( 'content', get_post_format() ); ?&gt;\n    &lt;div class=\"post-meta\"&gt;\n        &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;\/h3&gt;\n        &lt;span&gt;&lt;?php the_content(); ?&gt;&lt;\/span&gt;\n    &lt;\/div&gt;\n&lt;?php endwhile; ?&gt;\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<h4>3. &#20351;&#29992;&#23884;&#22871;&#24490;&#29615;&#26174;&#31034;&#33258;&#23450;&#20041;&#23383;&#27573;<\/h4>\n<p>&#22914;&#26524;&#20320;&#24076;&#26395;&#22312;&#26576;&#20123;&#24773;&#20917;&#19979;&#21516;&#26102;&#26174;&#31034;&#20004;&#20010;&#33258;&#23450;&#20041;&#23383;&#27573;&#30340;&#20869;&#23481;&#65292;&#20320;&#21487;&#20197;&#20351;&#29992;&#23884;&#22871;&#24490;&#29615;&#12290;&#20197;&#19979;&#26159;&#22914;&#20309;&#20570;&#21040;&#36825;&#19968;&#28857;&#30340;&#20363;&#23376;&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;div class=\"row\"&gt;\n    &lt;div class=\"col-md-6\"&gt;\n        &lt;div class=\"post-meta\"&gt;\n            &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;\/h3&gt;\n            &lt;span&gt;&lt;?php the_content(); ?&gt;&lt;\/span&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n    &lt;div class=\"col-md-6\"&gt;\n        &lt;div class=\"post-meta\"&gt;\n            &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;\/h3&gt;\n            &lt;span&gt;&lt;?php the_content(); ?&gt;&lt;\/span&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;\n\n&lt;div class=\"row\"&gt;\n    &lt;div class=\"col-md-6\"&gt;\n        &lt;div class=\"post-meta\"&gt;\n            &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;\/h3&gt;\n            &lt;span&gt;&lt;?php the_content(); ?&gt;&lt;\/span&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n    &lt;div class=\"col-md-6\"&gt;\n        &lt;div class=\"post-meta\"&gt;\n            &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;\/h3&gt;\n            &lt;span&gt;&lt;?php the_content(); ?&gt;&lt;\/span&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;<\/code><\/pre>\n<h4>4. &#20351;&#29992;&#23884;&#22871;&#24490;&#29615;&#21644;&#26465;&#20214;&#36807;&#28388;&#22120;&#22788;&#29702;&#33258;&#23450;&#20041;&#23383;&#27573;<\/h4>\n<p>&#38500;&#20102;&#31616;&#21333;&#30340;&#23884;&#22871;&#24490;&#29615;&#22806;&#65292;&#20320;&#36824;&#21487;&#20197;&#20351;&#29992;&#26465;&#20214;&#36807;&#28388;&#22120;&#26469;&#26681;&#25454;&#29305;&#23450;&#26465;&#20214;&#21160;&#24577;&#22320;&#26174;&#31034;&#33258;&#23450;&#20041;&#23383;&#27573;&#30340;&#20869;&#23481;&#12290;&#20363;&#22914;&#65292;&#22914;&#26524;&#26576;&#20010;&#23383;&#27573;&#21482;&#22312;&#29305;&#23450;&#30340;&#25991;&#31456;&#31867;&#21035;&#19979;&#21487;&#35265;&#65292;&#20320;&#21487;&#20197;&#36825;&#26679;&#20570;&#65306;<\/p>\n<pre><code class=\"language-php\">if (get_post_type() == 'category') {\n    \/\/ &#26174;&#31034;&#29305;&#23450;&#20998;&#31867;&#19979;&#30340;&#33258;&#23450;&#20041;&#23383;&#27573;\n} else {\n    \/\/ &#26174;&#31034;&#20854;&#20182;&#31867;&#22411;&#30340;&#33258;&#23450;&#20041;&#23383;&#27573;\n}\n\n\/\/ &#20854;&#20182;&#36923;&#36753;...<\/code><\/pre>\n<h4>5. &#32467;&#26524;&#23637;&#31034;<\/h4>\n<p>&#26368;&#21518;&#65292;&#30830;&#20445;&#22312;HTML&#27169;&#26495;&#20013;&#27491;&#30830;&#22320;&#23884;&#20837;&#36825;&#20123;&#20869;&#23481;&#12290;&#36825;&#36890;&#24120;&#28041;&#21450;&#21040;&#23558;&#23884;&#22871;&#24490;&#29615;&#12289;&#26465;&#20214;&#36807;&#28388;&#22120;&#21644;&#20854;&#20182;HTML&#32467;&#26500;&#32452;&#21512;&#22312;&#19968;&#36215;&#12290;&#36890;&#36807;&#36825;&#31181;&#26041;&#24335;&#65292;&#20320;&#21487;&#20197;&#28789;&#27963;&#22320;&#23450;&#21046;&#33258;&#23450;&#20041;&#23383;&#27573;&#30340;&#26174;&#31034;&#26041;&#24335;&#65292;&#20351;&#20854;&#36866;&#24212;&#19981;&#21516;&#30340;&#24212;&#29992;&#22330;&#26223;&#12290;<\/p>\n<h3>&#31034;&#20363;&#20195;&#30721;<\/h3>\n<p>&#19979;&#38754;&#26159;&#19968;&#20123;&#20855;&#20307;&#30340;&#31034;&#20363;&#20195;&#30721;&#29255;&#27573;&#65292;&#23637;&#31034;&#20102;&#22914;&#20309;&#22312;WordPress&#20013;&#20351;&#29992;&#33258;&#23450;&#20041;&#23383;&#27573;&#24182;&#23545;&#20854;&#36827;&#34892;&#24490;&#29615;&#26174;&#31034;&#65306;<\/p>\n<ol>\n<li>\n<p><strong>&#21333;&#20010;&#33258;&#23450;&#20041;&#23383;&#27573;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-html\">&lt;?php if (have_rows('custom_fields')):?&gt;\n   &lt;?php while(have_rows('custom_fields')): the_row();\n       echo '&lt;p&gt;' . get_sub_field('value') . '&lt;\/p&gt;';\n   endwhile;?&gt;\n&lt;?php endif;?&gt;<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#23884;&#22871;&#33258;&#23450;&#20041;&#23383;&#27573;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-html\">&lt;?php if (have_rows('custom_fields')):?&gt;\n   &lt;?php while(have_rows('custom_fields')): the_row();\n       echo '&lt;div class=\"row\"&gt;';\n           echo '&lt;div class=\"col-md-6\"&gt;';\n               echo '&lt;p&gt;' . get_sub_field('value') . '&lt;\/p&gt;';\n           echo '&lt;\/div&gt;';\n           echo '&lt;div class=\"col-md-6\"&gt;';\n               echo '&lt;p&gt;' . get_sub_field('another_value') . '&lt;\/p&gt;';\n           echo '&lt;\/div&gt;';\n       endwhile;\n   echo '&lt;\/div&gt;';\n&lt;?php endif;?&gt;<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#26465;&#20214;&#28210;&#26579;&#33258;&#23450;&#20041;&#23383;&#27573;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-html\">&lt;?php if (have_rows('custom_fields')):?&gt;\n   &lt;?php while(have_rows('custom_fields')): the_row();\n       echo '&lt;p&gt;' . get_sub_field('value') . '&lt;\/p&gt;';\n   endwhile;?&gt;\n&lt;?php endif;?&gt;<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#23884;&#22871;&#24490;&#29615;&#21644;&#26465;&#20214;&#36807;&#28388;&#22120;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-html\">&lt;?php if (get_post_type() == 'category') { ?&gt;\n   &lt;?php while (have_posts()) : the_post(); ?&gt;\n       &lt;?php get_template_part('content', get_post_format()); ?&gt;\n   &lt;?php endwhile; ?&gt;\n&lt;?php } else { ?&gt;\n   &lt;!-- &#20854;&#20182;&#20869;&#23481; --&gt;\n&lt;?php } ?&gt;<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#33258;&#23450;&#20041;CSS&#26679;&#24335;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-css\">.post-meta {\n   border-bottom: 1px solid #ccc;\n}<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>&#20197;&#19978;&#23601;&#26159;&#22914;&#20309;&#22312;WordPress&#20013;&#20351;&#29992;&#33258;&#23450;&#20041;&#23383;&#27573;&#20197;&#21450;&#22914;&#20309;&#23545;&#20854;&#20869;&#23481;&#36827;&#34892;&#24490;&#29615;&#26174;&#31034;&#30340;&#22522;&#26412;&#26041;&#27861;&#12290;&#36890;&#36807;&#19981;&#26029;&#32451;&#20064;&#21644;&#23454;&#36341;&#65292;&#20320;&#21487;&#20197;&#36880;&#27493;&#25484;&#25569;&#26356;&#22797;&#26434;&#30340;&#33258;&#23450;&#20041;&#21151;&#33021;&#21644;&#24067;&#23616;&#35774;&#35745;&#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 &#20013;&#65292;&#22914;&#26524;&#20320;&#24819;&#35201;&#22312;&#19968;&#20010;&#39029;&#38754;&#25110;&#25991;&#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":[52,53],"tuisongtax":[],"class_list":["post-1897","post","type-post","status-publish","format-standard","hentry","category-wpdt","tag-ztjc","tag-ztmbpzjc"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/1897","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=1897"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/1897\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=1897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=1897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=1897"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=1897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}