{"id":4188,"date":"2026-02-11T18:32:16","date_gmt":"2026-02-12T02:32:16","guid":{"rendered":"https:\/\/www.tiptinker.com\/easy-sitemap-wordpress-plugin\/"},"modified":"2026-02-24T06:26:24","modified_gmt":"2026-02-24T14:26:24","slug":"easy-sitemap-wordpress-plugin","status":"publish","type":"page","link":"https:\/\/www.tiptinker.com\/zh-hans\/easy-sitemap-wordpress-plugin\/","title":{"rendered":"\u7b80\u6613\u7f51\u7ad9\u5730\u56fe\uff08WordPress \u63d2\u4ef6\uff09"},"content":{"rendered":"<p><strong>\u4e00\u6b3e\u9002\u7528\u4e8e WordPress \u7684\u73b0\u4ee3\u5316\u3001\u9ad8\u6027\u80fd HTML \u7f51\u7ad9\u5730\u56fe\u751f\u6210\u5668\u3002<\/strong><\/p>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/easy-sitemap\/\">Easy Sitemap<\/a> \u5141\u8bb8\u60a8\u4f7f\u7528\u5f3a\u5927\u7684\u77ed\u4ee3\u7801\u7cfb\u7edf\uff0c\u4e3a\u9875\u9762\u3001\u6587\u7ae0\u548c\u81ea\u5b9a\u4e49\u6587\u7ae0\u7c7b\u578b\uff08CPTs\uff09\u663e\u793a\u5b8c\u5168\u53ef\u81ea\u5b9a\u4e49\u7684\u7f51\u7ad9\u5730\u56fe\u3002\u5b83\u91c7\u7528\u73b0\u4ee3\u5316\u7684 OOP \u67b6\u6784\u6784\u5efa\uff0c\u5177\u5907\u667a\u80fd\u7f13\u5b58\u3001PSR-4 \u81ea\u52a8\u52a0\u8f7d\u529f\u80fd\uff0c\u5e76\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u94a9\u5b50\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/snowbedding\/easy-sitemap\/main\/screenshot-1.jpg\" alt=\"Easy Sitemap (WordPress Plugin)\" \/><\/p>\n<h2>\u2728 \u4e3b\u8981\u7279\u6027<\/h2>\n<h3>  \u9762\u5411\u7f51\u7ad9\u5efa\u8bbe\u8005<\/h3>\n<ul>\n<li><strong>\u901a\u7528\u81ea\u5b9a\u4e49\u6587\u7ae0\u7c7b\u578b\u652f\u6301\uff1a<\/strong> \u81ea\u52a8\u68c0\u6d4b\u5e76\u652f\u6301\u6240\u6709\u516c\u5f00\u6587\u7ae0\u7c7b\u578b\uff08\u5305\u62ec WooCommerce \u4ea7\u54c1\u3001\u4f5c\u54c1\u96c6\u7b49\uff09\u3002<\/li>\n<li><strong>\u53ef\u89c6\u5316\u77ed\u4ee3\u7801\u751f\u6210\u5668\uff1a<\/strong> \u7ba1\u7406\u9762\u677f\u5185\u7f6e\u4ea4\u4e92\u5f0f\u6784\u5efa\u5668\uff0c\u65e0\u9700\u8bb0\u5fc6\u5c5e\u6027\u5373\u53ef\u751f\u6210\u4ee3\u7801\u3002<\/li>\n<li><strong>\u5c42\u7ea7\u5e03\u5c40\uff1a<\/strong> \u663e\u793a\u9875\u9762\u7684\u7236\u5b50\u5173\u7cfb\u4ee5\u53ca\u6587\u7ae0\u7684\u7c7b\u522b\u5206\u7ec4\u3002<\/li>\n<li><strong>\u54cd\u5e94\u5f0f\u7f51\u683c\uff1a<\/strong> \u901a\u8fc7 CSS \u7f51\u683c\u652f\u6301\u591a\u5217\u5e03\u5c40\uff08\u6700\u591a 6 \u5217\uff09\u3002<\/li>\n<li><strong>\u5b89\u5168\u81ea\u5b9a\u4e49\u6837\u5f0f\uff1a<\/strong> \u76f4\u63a5\u5728\u63d2\u4ef6\u8bbe\u7f6e\u4e2d\u6dfb\u52a0\u81ea\u5b9a\u4e49 CSS\uff0c\u65e0\u9700\u4fee\u6539\u4e3b\u9898\u3002<\/li>\n<\/ul>\n<h3>\u26a1 \u6027\u80fd\u4e0e\u6280\u672f<\/h3>\n<ul>\n<li><strong>\u667a\u80fd\u7f13\u5b58\uff1a<\/strong> \u5229\u7528WordPress\u77ac\u6001\u7f13\u5b58\u4e3a\u8bbf\u5ba2\u7f13\u5b58\u8f93\u51fa\uff0c\u540c\u65f6\u4e3a\u767b\u5f55\u7528\u6237\u4fdd\u6301\u5185\u5bb9\u52a8\u6001\u66f4\u65b0\u3002<\/li>\n<li><strong>\u4f18\u5316\u67e5\u8be2\uff1a<\/strong> \u4f7f\u7528<code>no_found_rows<\/code>\u548c\u9ad8\u6548\u7684\u6570\u636e\u5e93\u8c03\u7528\u6765\u6700\u5c0f\u5316\u5f00\u9500\u3002<\/li>\n<li><strong>\u73b0\u4ee3\u67b6\u6784\uff1a<\/strong> \u91c7\u7528\u6e05\u6670\u7684\u9762\u5411\u5bf9\u8c61\u8bbe\u8ba1\uff0c\u5e76\u652f\u6301PSR-4\u81ea\u52a8\u52a0\u8f7d\u3002<\/li>\n<li><strong>SEO\u53cb\u597d\uff1a<\/strong> \u751f\u6210\u8bed\u4e49\u5316\u7684\u7ed3\u6784\u5316HTML\u6807\u8bb0\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>  \u8981\u6c42<\/h2>\n<ul>\n<li><strong>WordPress\uff1a<\/strong> 5.0\u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<li><strong>PHP\uff1a<\/strong> 7.2\u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<li><strong>MySQL\uff1a<\/strong> 5.6\u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<\/ul>\n<hr \/>\n<h2>  \u5b89\u88c5<\/h2>\n<ol>\n<li><strong>\u4e0b\u8f7d\uff1a<\/strong> \u63d0\u53d6\u63d2\u4ef6\u6587\u4ef6\u3002<\/li>\n<li><strong>\u4e0a\u4f20\uff1a<\/strong> \u5c06 <code>easy-sitemap<\/code> \u6587\u4ef6\u5939\u79fb\u52a8\u5230\u60a8\u670d\u52a1\u5668\u7684 <code>\/wp-content\/plugins\/<\/code> \u76ee\u5f55\u3002<\/li>\n<li><strong>\u6fc0\u6d3b\uff1a<\/strong> \u8f6c\u5230 <strong>WordPress \u7ba1\u7406\u540e\u53f0 \u2192 \u63d2\u4ef6<\/strong> \u5e76\u6fc0\u6d3b <strong>Easy Sitemap<\/strong>\u3002<\/li>\n<li><strong>\u914d\u7f6e\uff1a<\/strong> \u524d\u5f80 <strong>\u8bbe\u7f6e \u2192 Easy Sitemap<\/strong> \u4ee5\u8c03\u6574\u5168\u5c40\u8bbe\u7f6e\u6216\u4f7f\u7528\u77ed\u4ee3\u7801\u751f\u6210\u5668\u3002<\/li>\n<\/ol>\n<hr \/>\n<h2>  \u77ed\u4ee3\u7801\u7528\u6cd5<\/h2>\n<p>\u8981\u663e\u793a\u7f51\u7ad9\u5730\u56fe\uff0c\u8bf7\u5c06\u77ed\u4ee3\u7801<br \/>\n<code>[easy_sitemap]<\/code><br \/>\n\u63d2\u5165\u5230\u4efb\u4f55\u6587\u7ae0\u3001\u9875\u9762\u6216\u5c0f\u5de5\u5177\u4e2d\u3002<\/p>\n<h3>\u77ed\u4ee3\u7801\u751f\u6210\u5668<\/h3>\n<p><em>\u63a8\u8350\uff1a<\/em> \u65e0\u9700\u624b\u52a8\u8f93\u5165\u5c5e\u6027\uff0c\u8bf7\u524d\u5f80 <strong>\u8bbe\u7f6e \u2192 Easy Sitemap<\/strong>\u3002\u5185\u7f6e\u7684\u751f\u6210\u5668\u5141\u8bb8\u60a8\u901a\u8fc7\u7528\u6237\u754c\u9762\u5207\u6362\u9009\u9879\uff0c\u5e76\u81ea\u52a8\u5c06\u751f\u6210\u7684\u77ed\u4ee3\u7801\u590d\u5236\u5230\u60a8\u7684\u526a\u8d34\u677f\u3002<\/p>\n<h3>\u624b\u52a8\u5c5e\u6027\u53c2\u8003<\/h3>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5c5e\u6027\u81ea\u5b9a\u4e49\u8f93\u51fa\uff1a<\/p>\n<h4>1. \u5185\u5bb9\u4e0e\u8fc7\u6ee4<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>post_type<\/code><\/td>\n<td>string<\/td>\n<td><code>post<\/code><\/td>\n<td>\u8981\u663e\u793a\u7684\u6587\u7ae0\u7c7b\u578b\uff08\u4f8b\u5982\uff1a<code>page<\/code>\u3001<code>product<\/code>\u3001<code>portfolio<\/code>\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>limit<\/code><\/td>\n<td>int<\/td>\n<td><code>1000<\/code><\/td>\n<td>\u8981\u663e\u793a\u7684\u6700\u5927\u9879\u76ee\u6570\u91cf\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>include<\/code><\/td>\n<td>string<\/td>\n<td><em>null<\/em><\/td>\n<td>\u8981<strong>\u5305\u542b<\/strong>\u7684ID\u7684\u9017\u53f7\u5206\u9694\u5217\u8868\uff08\u4f8b\u5982\uff1a<code>10,15,22<\/code>\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>exclude<\/code><\/td>\n<td>string<\/td>\n<td><em>null<\/em><\/td>\n<td>\u8981<strong>\u6392\u9664<\/strong>\u7684ID\u7684\u9017\u53f7\u5206\u9694\u5217\u8868\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>category<\/code><\/td>\n<td>string<\/td>\n<td><em>null<\/em><\/td>\n<td>\u6309\u5206\u7c7b\u522b\u540d\u7b5b\u9009\uff08\u4f8b\u5982\uff1a<code>news,updates<\/code>\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>tag<\/code><\/td>\n<td>string<\/td>\n<td><em>null<\/em><\/td>\n<td>\u6309\u6807\u7b7e\u522b\u540d\u7b5b\u9009\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>author<\/code><\/td>\n<td>int<\/td>\n<td><em>null<\/em><\/td>\n<td>\u6309\u4f5c\u8005ID\u7b5b\u9009\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>date_from<\/code><\/td>\n<td>string<\/td>\n<td><em>null<\/em><\/td>\n<td>\u5f00\u59cb\u65e5\u671f\uff08\u683c\u5f0f\uff1a<code>YYYY-MM-DD<\/code>\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>date_to<\/code><\/td>\n<td>string<\/td>\n<td><em>null<\/em><\/td>\n<td>\u7ed3\u675f\u65e5\u671f\uff08\u683c\u5f0f\uff1a<code>YYYY-MM-DD<\/code>\uff09\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2. \u9ad8\u7ea7\u5206\u7c7b\u6cd5\u7b5b\u9009<\/h4>\n<p>\u8981\u6309\u81ea\u5b9a\u4e49\u5206\u7c7b\u6cd5\uff08\u4f8b\u5982\uff0cWooCommerce \u4ea7\u54c1\u5206\u7c7b\uff09\u8fdb\u884c\u7b5b\u9009\uff1a<\/p>\n<ul>\n<li><strong><code>taxonomy<\/code><\/strong>\uff1a\u5206\u7c7b\u6cd5\u522b\u540d\uff08\u4f8b\u5982 <code>product_cat<\/code>\uff09\u3002<\/li>\n<li><strong><code>term<\/code><\/strong>\uff1a\u7279\u5b9a\u672f\u8bed\u522b\u540d\uff08\u4f8b\u5982 <code>accessories<\/code>\uff09\u3002<\/li>\n<li><em>\u6ce8\u610f\uff1a\u8fd9\u4e24\u4e2a\u5c5e\u6027\u5fc5\u987b\u540c\u65f6\u4f7f\u7528\u3002<\/em><\/li>\n<\/ul>\n<h4>3. \u6392\u5e8f<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u9009\u9879<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>orderby<\/code><\/td>\n<td><code>date<\/code>, <code>title<\/code>, <code>modified<\/code>, <code>menu_order<\/code>, <code>rand<\/code>, <code>ID<\/code><\/td>\n<td><code>date<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>order<\/code><\/td>\n<td><code>DESC<\/code> (\u964d\u5e8f), <code>ASC<\/code> (\u5347\u5e8f)<\/td>\n<td><code>DESC<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4. \u663e\u793a\u4e0e\u5e03\u5c40<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>show_dates<\/code><\/td>\n<td>\u5e03\u5c14\u578b<\/td>\n<td><code>0<\/code><\/td>\n<td>\u5728\u6807\u9898\u65c1\u663e\u793a\u53d1\u5e03\u65e5\u671f\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>show_excerpts<\/code><\/td>\n<td>\u5e03\u5c14\u578b<\/td>\n<td><code>0<\/code><\/td>\n<td>\u663e\u793a\u6587\u7ae0\u6458\u8981\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>show_images<\/code><\/td>\n<td>\u5e03\u5c14\u578b<\/td>\n<td><code>0<\/code><\/td>\n<td>\u663e\u793a\u7279\u8272\u56fe\u50cf\uff08\u7f29\u7565\u56fe\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>hierarchical<\/code><\/td>\n<td>\u5e03\u5c14\u578b<\/td>\n<td><code>0<\/code><\/td>\n<td>\u663e\u793a\u7236\/\u5b50\u7ed3\u6784\uff08\u9875\u9762\uff09\u6216\u5206\u7c7b\u5206\u7ec4\uff08\u6587\u7ae0\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>columns<\/code><\/td>\n<td>\u6574\u578b<\/td>\n<td><code>1<\/code><\/td>\n<td>\u5c06\u5217\u8868\u5206\u680f\u663e\u793a\uff08\u6700\u5927\uff1a<code>6<\/code>\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>class<\/code><\/td>\n<td>\u5b57\u7b26\u4e32<\/td>\n<td><em>\u7a7a<\/em><\/td>\n<td>\u5411\u5305\u88c5\u5668\u6dfb\u52a0\u81ea\u5b9a\u4e49 CSS \u7c7b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5. \u7f13\u5b58\uff08\u6309\u5b9e\u4f8b\uff09<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>cache<\/code><\/td>\n<td>\u8bbe\u7f6e\u4e3a <code>0<\/code> \u53ef\u4e3a\u7279\u5b9a\u77ed\u4ee3\u7801\u7981\u7528\u7f13\u5b58\uff08\u8986\u76d6\u5168\u5c40\u8bbe\u7f6e\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>cache_expiry<\/code><\/td>\n<td>\u6301\u7eed\u65f6\u95f4\uff0c\u5355\u4f4d\u4e3a\u79d2\uff08\u9ed8\u8ba4\u503c\uff1a<code>3600<\/code>\uff09\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>  \u793a\u4f8b<\/h2>\n<p><strong>\u6807\u51c6\u535a\u5ba2\u5217\u8868<\/strong><\/p>\n<pre><code class=\"language-php\">[easy_sitemap post_type=\"post\" show_dates=\"1\" category=\"news\"]\n<\/code><\/pre>\n<p><strong>WooCommerce \u4ea7\u54c1\u7f51\u683c<\/strong><br \/>\n\u57283\u5217\u7f51\u683c\u4e2d\u663e\u793a12\u4e2a\u5e26\u56fe\u7247\u7684\u7535\u5b50\u4ea7\u54c1\u3002<\/p>\n<pre><code class=\"language-php\">[easy_sitemap post_type=\"product\" taxonomy=\"product_cat\" term=\"electronics\" show_images=\"1\" columns=\"3\" limit=\"12\"]\n<\/code><\/pre>\n<p><strong>\u5206\u5c42\u9875\u9762<\/strong><br \/>\n\u975e\u5e38\u9002\u5408\u7528\u4e8e\u76ee\u5f55\u6216\u7f51\u7ad9\u7d22\u5f15\u3002<\/p>\n<pre><code class=\"language-php\">[easy_sitemap post_type=\"page\" hierarchical=\"1\" orderby=\"menu_order\" order=\"ASC\"]\n<\/code><\/pre>\n<p><strong>\u6309\u65e5\u671f\u8303\u56f4\u7b5b\u9009\u4f5c\u54c1\u96c6<\/strong><\/p>\n<pre><code class=\"language-php\">[easy_sitemap post_type=\"portfolio\" date_from=\"2023-01-01\" date_to=\"2023-12-31\"]\n<\/code><\/pre>\n<hr \/>\n<h2>\u2699\ufe0f \u914d\u7f6e\u4e0e\u6027\u80fd<\/h2>\n<h3>\u667a\u80fd\u7f13\u5b58<\/h3>\n<p>\u8be5\u63d2\u4ef6\u91c7\u7528\u667a\u80fd\u7f13\u5b58\u7cfb\u7edf\uff0c\u786e\u4fdd\u5373\u4f7f\u751f\u6210\u5927\u578b\u7ad9\u70b9\u5730\u56fe\uff0c\u60a8\u7684\u7f51\u7ad9\u4f9d\u7136\u80fd\u4fdd\u6301\u5feb\u901f\u54cd\u5e94\u3002<\/p>\n<ul>\n<li><strong>\u5168\u5c40\u8bbe\u7f6e\uff1a<\/strong>\u53ef\u5728<strong>\u8bbe\u7f6e \u2192 Easy Sitemap<\/strong>\u4e2d\u914d\u7f6e\u7f13\u5b58\u3002<\/li>\n<li><strong>\u4ec5\u8bbf\u5ba2\u6a21\u5f0f\uff1a<\/strong>\u7f13\u5b58\u4ec5\u5e94\u7528\u4e8e\u672a\u767b\u5f55\u7528\u6237\uff08\u8bbf\u5ba2\uff09\u3002\u5df2\u767b\u5f55\u7684\u7ba1\u7406\u5458\u59cb\u7ec8\u67e5\u770b\u5b9e\u65f6\u6570\u636e\u3002<\/li>\n<li><strong>\u77ac\u6001\u7f13\u5b58\uff1a<\/strong>\u4f7f\u7528\u539f\u751f\u7684WordPress\u77ac\u6001\u7f13\u5b58\u3002<\/li>\n<li><strong>\u81ea\u52a8\u6e05\u9664\uff1a<\/strong>\u63d2\u4ef6\u505c\u7528\u65f6\u7f13\u5b58\u5c06\u81ea\u52a8\u6e05\u9664\u3002<\/li>\n<\/ul>\n<h3>\u81ea\u5b9a\u4e49\u6837\u5f0f<\/h3>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u63d2\u4ef6\u8bbe\u7f6e\u4e2d\u7684<strong>\u81ea\u5b9a\u4e49CSS<\/strong>\u6846\u6765\u8bbe\u7f6e\u7ad9\u70b9\u5730\u56fe\u7684\u6837\u5f0f\u3002<\/p>\n<p><strong>\u5e38\u7528\u9009\u62e9\u5668\uff1a<\/strong><\/p>\n<pre><code class=\"language-css\">\/* \u5bb9\u5668 *\/\n.easy-sitemap { margin-bottom: 30px; }\n\n\/* \u5217\u8868\u9879 *\/\n.easy-sitemap-item { border-bottom: 1px solid #eee; }\n\n\/* \u56fe\u7247 *\/\n.easy-sitemap-image { border-radius: 4px; max-width: 80px; }\n\n\/* \u65e5\u671f *\/\n.easy-sitemap-date { font-size: 0.85em; color: #888; }\n<\/code><\/pre>\n<hr \/>\n<h2> \u200d  \u5f00\u53d1\u8005\u6587\u6863<\/h2>\n<h3>\u67b6\u6784<\/h3>\n<p>\u8be5\u63d2\u4ef6\u9075\u5faa\u4e25\u683c\u7684 PSR-4 \u6807\u51c6\uff0c\u5e76\u5c06 Admin\u3001Frontend \u548c Core \u903b\u8f91\u6309\u5173\u6ce8\u70b9\u5206\u79bb\u3002<\/p>\n<pre><code class=\"language-text\">classes\/\n\u251c\u2500\u2500 EasySitemap\/\n\u2502   \u251c\u2500\u2500 Admin\/          # \u8bbe\u7f6e\u4e0e\u7528\u6237\u754c\u9762\n\u2502   \u251c\u2500\u2500 Frontend\/       # \u77ed\u4ee3\u7801\u5f15\u64ce\u4e0e\u8d44\u6e90\u6587\u4ef6\n\u2502   \u251c\u2500\u2500 Autoloader.php\n\u2502   \u2514\u2500\u2500 Plugin.php      # \u5f15\u5bfc\u7a0b\u5e8f\n<\/code><\/pre>\n<h3>\u94a9\u5b50\u4e0e\u8fc7\u6ee4\u5668<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u8fc7\u6ee4\u5668\u4ee5\u7f16\u7a0b\u65b9\u5f0f\u4fee\u6539\u884c\u4e3a\uff1a<\/p>\n<p><strong>1. \u4fee\u6539\u67e5\u8be2\u53c2\u6570<\/strong><br \/>\n\u5728\u83b7\u53d6\u7ad9\u70b9\u5730\u56fe\u4e4b\u524d\uff0c\u8c03\u6574<br \/>\n<code>WP_Query<\/code><br \/>\n\u53c2\u6570\u3002<\/p>\n<pre><code class=\"language-php\">add_filter( 'easy_sitemap_query_args', function( $query_args, $atts ) {\n    \/\/ \u793a\u4f8b\uff1a\u5f3a\u5236\u6240\u6709\u7ad9\u70b9\u5730\u56fe\u6392\u9664\u7279\u5b9a\u5206\u7c7bID\n    $query_args['category__not_in'] = [ 99 ];\n    return $query_args;\n}, 10, 2 );\n<\/code><\/pre>\n<p><strong>2. \u4fee\u6539\u8f93\u51fa HTML<\/strong><br \/>\n\u5728\u6700\u7ec8\u6e32\u67d3\u524d\u8fc7\u6ee4\u8f93\u51fa\u7684 HTML\u3002<\/p>\n<pre><code class=\"language-php\">add_filter( 'easy_sitemap_output', function( $output, $atts, $posts ) {\n    return '&lt;div class=\"my-wrapper\"&gt;' . $output . '&lt;\/div&gt;';\n}, 10, 3 );\n<\/code><\/pre>\n<p><strong>3. \u66f4\u6539\u56fe\u7247\u5c3a\u5bf8<\/strong><br \/>\n\u66f4\u6539\u6e90\u56fe\u7247\u5c3a\u5bf8\uff08\u9ed8\u8ba4\u4e3a &#8216;thumbnail&#8217;\uff09\u3002<\/p>\n<pre><code class=\"language-php\">add_filter( 'easy_sitemap_image_size', function( $size ) {\n    return 'medium'; \n} );\n<\/code><\/pre>\n<p><strong>4. \u6dfb\u52a0\u652f\u6301\u7684\u5e16\u5b50\u7c7b\u578b<\/strong><br \/>\n\u5982\u679c\u81ea\u52a8\u68c0\u6d4b\u5931\u8d25\uff0c\u624b\u52a8\u6ce8\u5165\u5bf9\u590d\u6742 CPT\uff08\u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\uff09\u7684\u652f\u6301\u3002<\/p>\n<pre><code class=\"language-php\">add_filter( 'easy_sitemap_supported_post_types', function( $post_types ) {\n    $post_types['my_custom_type'] = 'My Custom Type';\n    return $post_types;\n} );\n<\/code><\/pre>\n<hr \/>\n<h2>  \u6545\u969c\u6392\u9664<\/h2>\n<ul>\n<li><strong>\u56fe\u7247\u4e0d\u663e\u793a\uff1f<\/strong> \u8bf7\u786e\u4fdd\u5b58\u5728 <code>show_images=\"1\"<\/code> \u5c5e\u6027\uff0c\u5e76\u4e14\u60a8\u7684\u4e3b\u9898\u652f\u6301\u6587\u7ae0\u7f29\u7565\u56fe\u3002<\/li>\n<li><strong>\u66f4\u6539\u672a\u751f\u6548\uff1f<\/strong> \u5982\u679c\u542f\u7528\u4e86\u7f13\u5b58\uff0c\u8bf7\u7b49\u5f85\u8fc7\u671f\u65f6\u95f4\uff08\u9ed8\u8ba4\u4e3a1\u5c0f\u65f6\uff09\u6216\u4fdd\u5b58\u63d2\u4ef6\u8bbe\u7f6e\u9875\u9762\u4ee5\u624b\u52a8\u5237\u65b0\u7f13\u5b58\u3002<\/li>\n<li><strong>\u77ed\u4ee3\u7801\u751f\u6210\u5668\u95ee\u9898\uff1f<\/strong> \u8bf7\u786e\u4fdd\u60a8\u7684\u6d4f\u89c8\u5668\u5141\u8bb8\u526a\u8d34\u677f\u8bbf\u95ee\u3002\u5982\u679c&#8221;\u590d\u5236&#8221;\u6309\u94ae\u5931\u6548\uff0c\u8bf7\u4ece\u751f\u6210\u5668\u6846\u4e2d\u624b\u52a8\u590d\u5236\u6587\u672c\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>  \u8bb8\u53ef\u8bc1\u4e0e\u9e23\u8c22<\/h2>\n<p><strong>\u8bb8\u53ef\u8bc1\uff1a<\/strong> GNU\u901a\u7528\u516c\u5171\u8bb8\u53ef\u8bc1 v2.0 \u6216\u66f4\u9ad8\u7248\u672c\u3002<\/p>\n<p><em>\u6000\u7740 \u2764\ufe0f \u4e3a WordPress \u793e\u533a\u6253\u9020\u3002<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u6b3e\u9002\u7528\u4e8e WordPress \u7684\u73b0\u4ee3\u5316\u3001\u9ad8\u6027\u80fd HTML \u7f51\u7ad9\u5730\u56fe\u751f\u6210\u5668\u3002 Easy Sitemap \u5141\u8bb8\u60a8\u4f7f\u7528\u5f3a\u5927\u7684\u77ed\u4ee3\u7801\u7cfb\u7edf\uff0c\u4e3a\u9875\u9762\u3001\u6587\u7ae0\u548c\u81ea\u5b9a\u4e49\u6587\u7ae0\u7c7b\u578b\uff08CPTs\uff09\u663e\u793a\u5b8c\u5168\u53ef\u81ea\u5b9a\u4e49\u7684\u7f51\u7ad9\u5730\u56fe\u3002\u5b83\u91c7\u7528\u73b0\u4ee3\u5316\u7684 OOP \u67b6\u6784\u6784\u5efa\uff0c\u5177\u5907\u667a\u80fd\u7f13\u5b58\u3001PSR-4 \u81ea\u52a8\u52a0\u8f7d\u529f\u80fd\uff0c\u5e76\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u94a9\u5b50\u3002 \u2728 \u4e3b\u8981\u7279\u6027 \u9762\u5411\u7f51\u7ad9\u5efa\u8bbe\u8005 \u901a\u7528\u81ea\u5b9a\u4e49\u6587\u7ae0\u7c7b\u578b\u652f\u6301\uff1a \u81ea\u52a8\u68c0\u6d4b\u5e76\u652f\u6301\u6240\u6709\u516c\u5f00\u6587\u7ae0\u7c7b\u578b\uff08\u5305\u62ec WooCommerce \u4ea7\u54c1\u3001\u4f5c\u54c1\u96c6\u7b49\uff09\u3002 \u53ef\u89c6\u5316\u77ed\u4ee3\u7801\u751f\u6210\u5668\uff1a \u7ba1\u7406\u9762\u677f\u5185\u7f6e\u4ea4\u4e92\u5f0f\u6784\u5efa\u5668\uff0c\u65e0\u9700\u8bb0\u5fc6\u5c5e\u6027\u5373\u53ef\u751f\u6210\u4ee3\u7801\u3002 \u5c42\u7ea7\u5e03\u5c40\uff1a \u663e\u793a\u9875\u9762\u7684\u7236\u5b50\u5173\u7cfb\u4ee5\u53ca\u6587\u7ae0\u7684\u7c7b\u522b\u5206\u7ec4\u3002 \u54cd\u5e94\u5f0f\u7f51\u683c\uff1a \u901a\u8fc7 CSS \u7f51\u683c\u652f\u6301\u591a\u5217\u5e03\u5c40\uff08\u6700\u591a 6 \u5217\uff09\u3002 \u5b89\u5168\u81ea\u5b9a\u4e49\u6837\u5f0f\uff1a \u76f4\u63a5\u5728\u63d2\u4ef6\u8bbe\u7f6e\u4e2d\u6dfb\u52a0\u81ea\u5b9a\u4e49 CSS\uff0c\u65e0\u9700\u4fee\u6539\u4e3b\u9898\u3002 \u26a1 \u6027\u80fd\u4e0e\u6280\u672f \u667a\u80fd\u7f13\u5b58\uff1a \u5229\u7528WordPress\u77ac\u6001\u7f13\u5b58\u4e3a\u8bbf\u5ba2\u7f13\u5b58\u8f93\u51fa\uff0c\u540c\u65f6\u4e3a\u767b\u5f55\u7528\u6237\u4fdd\u6301\u5185\u5bb9\u52a8\u6001\u66f4\u65b0\u3002 \u4f18\u5316\u67e5\u8be2\uff1a \u4f7f\u7528no_found_rows\u548c\u9ad8\u6548\u7684\u6570\u636e\u5e93\u8c03\u7528\u6765\u6700\u5c0f\u5316\u5f00\u9500\u3002 \u73b0\u4ee3\u67b6\u6784\uff1a \u91c7\u7528\u6e05\u6670\u7684\u9762\u5411\u5bf9\u8c61\u8bbe\u8ba1\uff0c\u5e76\u652f\u6301PSR-4\u81ea\u52a8\u52a0\u8f7d\u3002 SEO\u53cb\u597d\uff1a \u751f\u6210\u8bed\u4e49\u5316\u7684\u7ed3\u6784\u5316HTML\u6807\u8bb0\u3002 \u8981\u6c42 WordPress\uff1a 5.0\u6216\u66f4\u9ad8\u7248\u672c PHP\uff1a 7.2\u6216\u66f4\u9ad8\u7248\u672c MySQL\uff1a 5.6\u6216\u66f4\u9ad8\u7248\u672c \u5b89\u88c5 \u4e0b\u8f7d\uff1a \u63d0\u53d6\u63d2\u4ef6\u6587\u4ef6\u3002 \u4e0a\u4f20\uff1a \u5c06 easy-sitemap \u6587\u4ef6\u5939\u79fb\u52a8\u5230\u60a8\u670d\u52a1\u5668\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/fullwidth.php","meta":{"footnotes":""},"class_list":["post-4188","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/pages\/4188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=4188"}],"version-history":[{"count":0,"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/pages\/4188\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tiptinker.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=4188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}