{"id":2136,"date":"2025-06-10T21:47:54","date_gmt":"2025-06-10T13:47:54","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/2136.html"},"modified":"2025-06-10T21:47:54","modified_gmt":"2025-06-10T13:47:54","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e6%82%a8%e7%9a%84wordpress%e7%bd%91%e7%ab%99%e4%b8%8a%e5%b1%95%e7%a4%batrustpilot%e8%af%84%e8%ae%ba","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/2136.html","title":{"rendered":"\u5982\u4f55\u5728\u60a8\u7684WordPress\u7f51\u7ad9\u4e0a\u5c55\u793aTrustpilot\u8bc4\u8bba"},"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;&#20026;&#24744;&#30340;WordPress&#31449;&#28857;&#28155;&#21152;Trustpilot&#35780;&#35770;&#65292;&#24744;&#39318;&#20808;&#38656;&#35201;&#30830;&#20445;&#24744;&#30340;&#32593;&#31449;&#24050;&#32463;&#36830;&#25509;&#21040;Trustpilot&#36134;&#25143;&#24182;&#33719;&#24471;&#20102;&#24517;&#35201;&#30340;API&#23494;&#38053;&#21644;&#20196;&#29260;&#12290;&#28982;&#21518;&#65292;&#24744;&#21487;&#20197;&#25353;&#29031;&#20197;&#19979;&#27493;&#39588;&#26469;&#23454;&#29616;&#36825;&#19968;&#21151;&#33021;&#65306;<\/p>\n<h3>&#27493;&#39588;1&#65306;&#33719;&#21462;API&#23494;&#38053;&#21644;&#20196;&#29260;<\/h3>\n<p>&#39318;&#20808;&#65292;&#30331;&#24405;&#21040;&#24744;&#30340;Trustpilot&#24080;&#25143;&#65292;&#25214;&#21040;&ldquo;&#25105;&#30340;&#35774;&#32622;&rdquo; -&gt; &ldquo;&#24212;&#29992;&rdquo;&#65292;&#36825;&#37324;&#20250;&#26174;&#31034;&#24744;&#30340;API&#23494;&#38053;&#21644;&#20196;&#29260;&#12290;&#36825;&#20123;&#20449;&#24687;&#29992;&#20110;&#39564;&#35777;&#24744;&#30340;&#32593;&#31449;&#26159;&#21542;&#21487;&#20197;&#19982;Trustpilot API&#20132;&#20114;&#12290;<\/p>\n<h3>&#27493;&#39588;2&#65306;&#21019;&#24314;&#20449;&#20219;&#35780;&#20998;&#25554;&#20214;&#25110;&#33258;&#23450;&#20041;&#33050;&#26412;<\/h3>\n<p>&#24744;&#21487;&#20197;&#36873;&#25321;&#21019;&#24314;&#19968;&#20010;&#22522;&#20110;PHP&#30340;&#33258;&#23450;&#20041;&#33050;&#26412;&#26469;&#22788;&#29702;&#29992;&#25143;&#25552;&#20132;&#30340;&#25968;&#25454;&#65292;&#25110;&#32773;&#20351;&#29992;&#29616;&#25104;&#30340;WordPress&#25554;&#20214;&#65288;&#22914;WP Trustpilot Review Widget&#65289;&#26469;&#31616;&#21270;&#27969;&#31243;&#12290;&#19979;&#38754;&#26159;&#20351;&#29992;PHP&#33258;&#23450;&#20041;&#33050;&#26412;&#30340;&#22522;&#26412;&#31034;&#20363;&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;?php\n\/\/ &#33719;&#21462;API&#23494;&#38053;&#21644;&#20196;&#29260;\n$api_key = 'YOUR_API_KEY';\n$token = 'YOUR_TOKEN';\n\n\/\/ &#33719;&#21462;&#29992;&#25143;&#30340;ID&#65288;&#20551;&#35774;&#29992;&#25143;&#24050;&#27880;&#20876;&#65289;\n$user_id = get_current_user_id();\n\n\/\/ &#20174;&#25968;&#25454;&#24211;&#33719;&#21462;&#29992;&#25143;&#35780;&#35770;\n$reviews = wp_get_recent_comments(array(\n    'numberposts' =&gt; -1,\n));\n\n\/\/ &#36941;&#21382;&#35780;&#35770;&#65292;&#25552;&#21462;&#24517;&#35201;&#30340;&#25968;&#25454;\nforeach ($reviews as $review) {\n    $comment_author = $review-&gt;comment_author;\n    $comment_content = strip_tags($review-&gt;comment_content);\n\n    \/\/ &#20351;&#29992;API&#26597;&#35810;&#35780;&#35770;&#35814;&#24773;\n    $response = wp_remote_post('https:\/\/api.trustpilot.com\/v4\/reviews\/' . $review-&gt;comment_ID, array(\n        'method' =&gt; 'POST',\n        'headers' =&gt; array(\n            'Authorization: Bearer ' . $api_key,\n            'Content-Type: application\/json',\n        ),\n        'body' =&gt; json_encode(array(\n            'content' =&gt; $comment_content,\n            'author_name' =&gt; $comment_author,\n        )),\n    ));\n\n    if (is_wp_error($response)) {\n        echo \"Error posting review: \" . $response-&gt;get_error_message();\n    } else {\n        echo \"Review posted successfully for user ID: \" . $user_id;\n    }\n}\n?&gt;<\/code><\/pre>\n<h3>&#27493;&#39588;3&#65306;&#37197;&#32622;WordPress<\/h3>\n<p>&#22312;&#24744;&#30340;WordPress&#21518;&#21488;&#65292;&#25214;&#21040;&ldquo;&#22806;&#35266;&rdquo; -&gt; &ldquo;&#20027;&#39064;&#23450;&#21046;&rdquo; -&gt; &ldquo;&#38468;&#21152;&#33050;&#26412;&rdquo;&#65292;&#22797;&#21046;&#19978;&#36848;PHP&#33050;&#26412;&#31896;&#36148;&#36827;&#21435;&#12290;&#20445;&#23384;&#26356;&#25913;&#21518;&#65292;&#24744;&#24212;&#35813;&#33021;&#22815;&#22312;&#24086;&#23376;&#25110;&#39029;&#38754;&#30340;&#35780;&#35770;&#37096;&#20998;&#30475;&#21040;&#26032;&#30340;&#35780;&#35770;&#34920;&#21333;&#20102;&#12290;<\/p>\n<h3>&#25928;&#26524;&#35828;&#26126;<\/h3>\n<p>&#24403;&#29992;&#25143;&#22312;&#35780;&#35770;&#21306;&#22495;&#36755;&#20837;&#20182;&#20204;&#30340;&#35780;&#35770;&#26102;&#65292;&#31995;&#32479;&#20250;&#33258;&#21160;&#36890;&#36807;API&#23558;&#35780;&#35770;&#25552;&#20132;&#21040;Trustpilot&#26381;&#21153;&#22120;&#12290;Trustpilot&#26381;&#21153;&#22120;&#20250;&#23545;&#35780;&#35770;&#36827;&#34892;&#23457;&#26680;&#65292;&#22914;&#26524;&#35780;&#35770;&#31526;&#21512;&#20854;&#25919;&#31574;&#65292;&#23427;&#20250;&#36820;&#22238;&#30456;&#24212;&#30340;&#21453;&#39304;&#12290;&#27492;&#36807;&#31243;&#21253;&#25324;&#25910;&#38598;&#35780;&#35770;&#12289;&#23457;&#26680;&#12289;&#22238;&#22797;&#31561;&#29615;&#33410;&#65292;&#26368;&#32456;&#32467;&#26524;&#20250;&#22312;Trustpilot&#30340;&#24179;&#21488;&#19978;&#26174;&#31034;&#20986;&#26469;&#12290;<\/p>\n<p>&#35831;&#27880;&#24847;&#65292;&#36825;&#20010;&#20363;&#23376;&#21482;&#26159;&#19968;&#20010;&#22522;&#26412;&#30340;&#26694;&#26550;&#65292;&#23454;&#38469;&#24212;&#29992;&#20013;&#21487;&#33021;&#38656;&#35201;&#26681;&#25454;&#20855;&#20307;&#24773;&#20917;&#36827;&#34892;&#35843;&#25972;&#65292;&#27604;&#22914;&#38169;&#35823;&#22788;&#29702;&#12289;&#23433;&#20840;&#25514;&#26045;&#31561;&#12290;&#27492;&#22806;&#65292;&#30001;&#20110;Trustpilot API&#26377;&#20005;&#26684;&#30340;&#38480;&#21046;&#21644;&#25910;&#36153;&#25919;&#31574;&#65292;&#24314;&#35758;&#35814;&#32454;&#20102;&#35299;&#21518;&#20877;&#20915;&#23450;&#26159;&#21542;&#20351;&#29992;&#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<p>&#22312;WordPress&#32593;&#31449;&#19978;&#23637;&#31034;Trustpilot&#35780;&#35770;&#26159;&#19968;&#31181;&#24120;&#35265;&#30340;&#20570;&#27861;&#65292;&#23427;&#21487;&#20197;&#24110;&#21161;&#24744;&#22686;&#21152;&#29992;&#25143;&#20449;&#20219;&#24182;&#25552;&#39640;&#32593;&#31449;&#22768;&#35465;&#12290;&#20197;&#19979;&#26159;&#22914;&#20309;&#20351;&#29992;WordPress&#21644;Trustpilot API&#26469;&#23454;&#29616;&#36825;&#19968;&#30446;&#26631;&#30340;&#26041;&#27861;&#65306;<\/p>\n<h3>&#31532;&#19968;&#27493;&#65306;&#23433;&#35013;Trustpilot&#25554;&#20214;<\/h3>\n<p>&#39318;&#20808;&#65292;&#30830;&#20445;&#24744;&#30340;WordPress&#31449;&#28857;&#24050;&#25104;&#21151;&#23433;&#35013;&#24182;&#28608;&#27963;&#20102;Trustpilot&#25554;&#20214;&#12290;&#24744;&#21487;&#20197;&#20174;WordPress&#25554;&#20214;&#21830;&#24215;&#19979;&#36733;&#27492;&#25554;&#20214;&#24182;&#25353;&#29031;&#25552;&#31034;&#23436;&#25104;&#23433;&#35013;&#12290;<\/p>\n<h3>&#31532;&#20108;&#27493;&#65306;&#35774;&#32622;Trustpilot&#35774;&#32622;<\/h3>\n<p>&#30331;&#24405;&#21040;Trustpilot&#21518;&#21488;&#31649;&#29702;&#30028;&#38754;&#65288;<a href=\"https:\/\/www.zhaozhao123.cn\/skin\/go?url=aHR0cHM6Ly93d3cudHJ1c3RwaWxvdC5jb20vJUVGJUJDJTg5JUVGJUJDJThDJUU3JTg0JUI2JUU1JTkwJThFJUU3JTgyJUI5JUU1JTg3JUJCJUUyJTgwJTlDJUU2JUI3JUJCJUU1JThBJUEwJUU2JTk2JUIwJUU3JUJEJTkxJUU3JUFCJTk5JUUyJTgwJTlEJUU0JUJCJUE1JUU1JTg4JTlCJUU1JUJCJUJBJUU2JTk2JUIwJUU3JTlBJTg0V29yZFByZXNzJUU3JUJEJTkxJUU3JUFCJTk5JUU5JTkzJUJFJUU2JThFJUE1JUUzJTgwJTgyJUU2JThFJUE1JUU0JUI4JThCJUU2JTlEJUE1JUVGJUJDJThDJUU1JTlDJUE4V29yZFByZXNzJUU0JUI4JUFEJUU1JUFGJUJDJUU4JTg4JUFBJUU4JTg3JUIzJUUyJTgwJTlDJUU4JUFFJUJFJUU3JUJEJUFFJUUyJTgwJTlELSZndDslRTIlODAlOUNUcnVzdHBpbG90JUUyJTgwJTlEJUVGJUJDJThDJUU1JTlDJUE4JUU4JUJGJTk5JUU5JTg3JThDJUU2JTgyJUE4JUU1JThGJUFGJUU0JUJCJUE1JUU4JUFFJUJFJUU3JUJEJUFFJUU3JUJEJTkxJUU3JUFCJTk5SUQlRTMlODAlODElRTUlQUYlODYlRTklOTIlQTUlRTUlOTIlOENBUEklRTUlQUYlODYlRTklOTIlQTUlRTclQUQlODklRTQlQkYlQTElRTYlODElQUY=\" rel=\"noopener noreferrer nofollow\"><a href=\"https:\/\/www.zhaozhao123.cn\/skin\/go?url=aHR0cHM6Ly93d3cudHJ1c3RwaWxvdC5jb20vJiM2NTI4OTsmIzY1MjkyOyYjMjg5ODI7JiMyMTUxODsmIzI4ODU3OyYjMjA5ODc7JmxkcXVvOyYjMjgxNTU7JiMyMTE1MjsmIzI2MDMyOyYjMzI1OTM7JiMzMTQ0OTsmcmRxdW87JiMyMDE5NzsmIzIxMDE5OyYjMjQzMTQ7JiMyNjAzMjsmIzMwMzQwO1dvcmRQcmVzcyYjMzI1OTM7JiMzMTQ0OTsmIzM4MTQyOyYjMjU1MDk7JiMxMjI5MDsmIzI1NTA5OyYjMTk5Nzk7JiMyNjQ2OTsmIzY1MjkyOyYjMjIzMTI7V29yZFByZXNzJiMyMDAxMzsmIzIzNTQ4OyYjMzMzMjI7JiMzMzI2NzsmbGRxdW87JiMzNTc3NDsmIzMyNjIyOyZyZHF1bzstJmd0OyZsZHF1bztUcnVzdHBpbG90JnJkcXVvOyYjNjUyOTI7JiMyMjMxMjsmIzM2ODI1OyYjMzczMjQ7JiMyNDc0NDsmIzIxNDg3OyYjMjAxOTc7JiMzNTc3NDsmIzMyNjIyOyYjMzI1OTM7JiMzMTQ0OTtJRCYjMTIyODk7JiMyMzQ5NDsmIzM4MDUzOyYjMjE2NDQ7QVBJJiMyMzQ5NDsmIzM4MDUzOyYjMzE1NjE7JiMyMDQ0OTsmIzAzODsjMjQ2ODc=\" rel=\"noopener noreferrer nofollow\" rel=\"nofollow\">https:\/\/www.trustpilot.com\/&#65289;&#65292;&#28982;&#21518;&#28857;&#20987;&ldquo;&#28155;&#21152;&#26032;&#32593;&#31449;&rdquo;&#20197;&#21019;&#24314;&#26032;&#30340;WordPress&#32593;&#31449;&#38142;&#25509;&#12290;&#25509;&#19979;&#26469;&#65292;&#22312;WordPress&#20013;&#23548;&#33322;&#33267;&ldquo;&#35774;&#32622;&rdquo;-&gt;&ldquo;Trustpilot&rdquo;&#65292;&#22312;&#36825;&#37324;&#24744;&#21487;&#20197;&#35774;&#32622;&#32593;&#31449;ID&#12289;&#23494;&#38053;&#21644;API&#23494;&#38053;&#31561;&#20449;&#038;#24687<\/a>;<\/a>&#12290;<\/p>\n<h3>&#31532;&#19977;&#27493;&#65306;&#33719;&#21462;Trustpilot API&#23494;&#38053;<\/h3>\n<p>&#35775;&#38382;Trustpilot&#32593;&#31449;&#21518;&#65292;&#36873;&#25321;&#24744;&#30340;&#36134;&#25143;&#65292;&#28982;&#21518;&#28857;&#20987;&ldquo;API&#23494;&#38053;&rdquo;&#12290;&#36825;&#23558;&#20026;&#24744;&#25552;&#20379;&#19968;&#20010;&#21253;&#21547;API&#23494;&#38053;&#30340;&#25991;&#26412;&#25991;&#20214;&#65292;&#24744;&#38656;&#35201;&#23558;&#20854;&#22797;&#21046;&#19979;&#26469;&#20197;&#20415;&#20110;&#21518;&#32493;&#25805;&#20316;&#12290;<\/p>\n<h3>&#31532;&#22235;&#27493;&#65306;&#22312;WordPress&#20013;&#26174;&#31034;Trustpilot&#35780;&#35770;<\/h3>\n<ol>\n<li><strong>&#30331;&#24405;WordPress<\/strong> &#8211; &#20351;&#29992;&#31649;&#29702;&#21592;&#36134;&#21495;&#30331;&#24405;&#12290;<\/li>\n<li><strong>&#32534;&#36753;&#20027;&#39064;<\/strong> &#8211; &#22312;WordPress&#20027;&#39064;&#32534;&#36753;&#22120;&#20013;&#25214;&#21040;&#25110;&#21019;&#24314;&#19968;&#20010;&#26032;&#30340;&#39029;&#38754;&#31867;&#22411;&#29992;&#20110;&#26174;&#31034;&#35780;&#35770;&#12290;&#20363;&#22914;&#65292;&ldquo;Trustpilot Review Page&rdquo;&#12290;<\/li>\n<li><strong>&#35774;&#32622;&#39029;&#38754;&#23646;&#24615;<\/strong> &#8211; &#20026;&#26032;&#21019;&#24314;&#30340;&#39029;&#38754;&#35774;&#32622;&#36866;&#24403;&#30340;&#26631;&#39064;&#21644;&#25551;&#36848;&#12290;<\/li>\n<li><strong>&#32534;&#20889;&#20195;&#30721;<\/strong> &#8211; &#22312;&#39029;&#38754;&#20803;&#32032;&#20013;&#25554;&#20837;Trustpilot&#35780;&#35770;&#12290;&#24744;&#21487;&#20197;&#36890;&#36807;&#20351;&#29992;<code>&lt;trustpilot-comment&gt;<\/code>&#26631;&#31614;&#26469;&#23884;&#22871;&#35780;&#35770;&#20869;&#23481;&#12290;&#35831;&#27880;&#24847;&#65292;&#35201;&#30830;&#20445;&#35780;&#35770;&#26684;&#24335;&#27491;&#30830;&#65292;&#20197;&#20415;Trustpilot&#33021;&#22815;&#35299;&#26512;&#23427;&#20204;&#12290;<\/li>\n<li><strong>&#27979;&#35797;&#21151;&#33021;<\/strong> &#8211; &#22312;&#27983;&#35272;&#22120;&#20013;&#25171;&#24320;&#36825;&#20010;&#39029;&#38754;&#65292;&#26597;&#30475;&#26159;&#21542;&#21487;&#20197;&#27491;&#24120;&#21152;&#36733;&#35780;&#35770;&#24182;&#38405;&#35835;&#23427;&#20204;&#12290;<\/li>\n<\/ol>\n<h3>&#31034;&#20363;&#20195;&#30721;<\/h3>\n<p>&#20551;&#35774;&#24744;&#24819;&#35201;&#22312;&#21517;&#20026;&ldquo;Test WordPress&rdquo;&#30340;&#20027;&#39064;&#20013;&#21019;&#24314;&#19968;&#20010;&#21517;&#20026;&ldquo;Trustpilot Review Page&rdquo;&#30340;&#39029;&#38754;&#65292;&#20854;&#20013;&#21253;&#21547;Trustpilot&#35780;&#35770;&#12290;&#20197;&#19979;&#26159;&#31034;&#20363;&#20195;&#30721;&#65306;<\/p>\n<pre><code class=\"language-html\">&lt;!-- Test WordPress Theme --&gt;\n&lt;?php get_header(); ?&gt;\n&lt;div class=\"wrap\"&gt;\n    &lt;h1&gt;&lt;?php echo esc_html(get_theme_mod('site_title', 'Test WordPress')); ?&gt;&lt;\/h1&gt;\n    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;\n        &lt;div class=\"trustpilot-review\"&gt;\n            &lt;!-- &#32763;&#35793;&#20026;&#23454;&#38469;&#30340;Trustpilot&#35780;&#35770; --&gt;\n            &lt;a href=\"&lt;?php the_permalink(); ?&gt;\" rel=\"noopener noreferrer\" target=\"_blank\"&gt;\n                &lt;img src=\"&lt;?php the_field('trustpilot_image'); ?&gt;\" alt=\"\" \/&gt;\n                &lt;span&gt;&lt;?php the_field('trustpilot_title'); ?&gt;&lt;\/span&gt;\n                &lt;span&gt;&lt;?php the_field('trustpilot_text'); ?&gt;&lt;\/span&gt;\n            &lt;\/a&gt;\n        &lt;\/div&gt;\n    &lt;?php endwhile; endif; ?&gt;\n&lt;\/div&gt;\n\n&lt;!-- Trustpilot API settings --&gt;\n&lt;script type=\"text\/javascript\"&gt;\n    var trustpilot_api_url = 'https:\/\/api.trustpilot.com\/v1';\n    var api_key = '&lt;?php echo esc_attr(get_theme_mod('trustpilot_api_key')); ?&gt;';\n    var site_id = '&lt;?php echo esc_attr(get_theme_mod('trustpilot_site_id')); ?&gt;';\n\n    \/\/ Fetching comments from Trustpilot API\n    fetch(trustpilot_api_url + '\/comments?site_id=' + site_id)\n        .then(response =&gt; response.json())\n        .then(data =&gt; {\n            const reviewsContainer = document.querySelector('.trustpilot-review');\n            data.forEach(comment =&gt; {\n                const reviewElement = document.createElement('li');\n                reviewElement.innerHTML = `&lt;a href=\"${comment.url}\" rel=\"noopener noreferrer\" target=\"_blank\"&gt;&lt;img src=\"${comment.image}\" alt=\"${comment.title}\" \/&gt;&lt;span&gt;${comment.title}&lt;\/span&gt;&lt;span&gt;${comment.text}&lt;\/span&gt;&lt;\/a&gt;`;\n                reviewsContainer.appendChild(reviewElement);\n            });\n        })\n        .catch(error =&gt; console.error(error));\n&lt;\/script&gt;<\/code><\/pre>\n<h3>&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ul>\n<li>&#30830;&#20445;&#24744;&#30340;WordPress&#32593;&#31449;&#21551;&#29992;&#20102;<code>wpseo-seo<\/code>&#27169;&#22359;&#65292;&#21542;&#21017;&#21487;&#33021;&#26080;&#27861;&#20351;&#29992;Trustpilot API&#12290;<\/li>\n<li>&#22914;&#26524;&#24744;&#30340;WordPress&#32593;&#31449;&#21551;&#29992;&#20102;HTTPS&#65292;&#35831;&#30830;&#20445;&#24744;&#30340;Trustpilot API&#23494;&#38053;&#21644;&#32593;&#31449;URL&#20063;&#20351;&#29992;HTTPS&#12290;<\/li>\n<li>&#35760;&#24471;&#26356;&#26032;&#24744;&#30340;Trustpilot API&#23494;&#38053;&#65292;&#20197;&#38450;&#27490;API&#23494;&#38053;&#36807;&#26399;&#23548;&#33268;&#26080;&#27861;&#35775;&#38382;&#35780;&#35770;&#12290;<\/li>\n<\/ul>\n<p>&#36890;&#36807;&#20197;&#19978;&#27493;&#39588;&#65292;&#24744;&#24212;&#35813;&#21487;&#20197;&#22312;WordPress&#32593;&#31449;&#19978;&#25104;&#21151;&#26174;&#31034;&#26469;&#33258;Trustpilot&#30340;&#35780;&#35770;&#12290;&#36825;&#31181;&#26041;&#27861;&#19981;&#20165;&#21487;&#20197;&#24110;&#21161;&#25552;&#21319;&#32593;&#31449;&#20449;&#35465;&#24230;&#65292;&#36824;&#21487;&#20197;&#21560;&#24341;&#26356;&#22810;&#30340;&#28508;&#22312;&#23458;&#25143;&#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;&#20026;&#24744;&#30340;WordPress&#31449;&#28857;&#28155;&#21152;Trustpilot&#35780;&#35770;&#65292;&#24744;&#39318;&#20808;&#038;..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[59],"tuisongtax":[],"class_list":["post-2136","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\/2136","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=2136"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/2136\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=2136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=2136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=2136"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=2136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}