{"id":450,"date":"2026-05-02T20:29:10","date_gmt":"2026-05-02T12:29:10","guid":{"rendered":"https:\/\/www.yukimia.top\/?p=450"},"modified":"2026-05-02T20:29:30","modified_gmt":"2026-05-02T12:29:30","slug":"%e9%9b%a8%e4%b9%8b%e5%ba%ad%e7%9a%84%e9%a1%b5%e9%9d%a2%e6%9d%bf%e5%9d%97%e6%a8%a1%e6%9d%bf%e8%ae%be%e8%ae%a1%e5%9b%9e%e9%a1%be","status":"publish","type":"post","link":"https:\/\/www.yukimia.top\/?p=450","title":{"rendered":"\u96e8\u4e4b\u5ead\u7684\u9875\u9762\u677f\u5757\u6a21\u677f\u8bbe\u8ba1\u56de\u987e"},"content":{"rendered":"\n<p>\u96e8\u4e4b\u5ead\u91c7\u7528WordPress\u5efa\u7ad9\uff0c\u5e76\u4f7f\u7528\u4e3b\u9898\u975e\u5e38\u7cbe\u81f4\u7f8e\u89c2\u7684Argon\u4e3b\u9898\uff08\u5728\u6b64\u611f\u8c22solstice23\u7684\u5f00\u6e90\uff09\uff0c\u4f46\u662f\uff0c\u6211\u81ea\u5df1\u5bf9\u4e00\u4e9b\u8bbe\u8ba1\u8fdb\u884c\u4e86\u4fee\u6539\uff0c\u8fd9\u7bc7\u6587\u7ae0\u6765\u8bb0\u5f55\u4e3b\u9898\u7684\u201c\u6587\u7ae0\u5361\u7247\u201d\u4fee\u6539\u3002<\/p>\n\n\n\n<p>Argon\u4e3b\u9898\u9ed8\u8ba4\u5728\u5efa\u7ad9\u7684\u4e3b\u9875\u5c31\u662f\u5c55\u793a\u6700\u65b0\u53d1\u5e03\u7684\u524d\u5341\u7bc7\u6587\u7ae0\uff0c\u8fd9\u4e9b\u6587\u7ae0\u4f1a\u4ee5\u5361\u7247\u7684\u5f62\u5f0f\uff0c\u7ecf\u7ad9\u957f\u7684\u8bbe\u5b9a\uff0c\u4e5f\u5c31\u662f\u5355\u680f\u3001\u53cc\u680f\u7b49\u5f62\u5f0f\u5c55\u793a\u51fa\u6765\u3002\u6211\u5f53\u521d\u89c9\u5f97\u8fd9\u4e2a\u6bd4\u8f83\u597d\u770b\uff0c\u4e8e\u662f\u5c31\u5e0c\u671b\u5728\u5176\u4ed6\u7684\u9875\u9762\u677f\u5757\u4e5f\u80fd\u591f\u6709\u8fd9\u4e2a\u4e1c\u897f\uff0c\u8fd9\u4e00\u65f6\u523b\uff0c\u5c31\u662f\u6211\u5927\u89c4\u6a21\u63a5\u89e6PHP\u8bed\u8a00\u7684\u5f00\u7aef\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1 \u590d\u5236\u4e3b\u9875\u529f\u80fd<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 \u5bfc\u8bed\u4e0e\u6587\u7ae0\u67e5\u8be2<\/h3>\n\n\n\n<p>\u6211\u7ffb\u5f00\u4e86WordPress\u7684\u4e3b\u9898\u9875\u9762\u7f16\u8f91\u5668\uff0c\u67e5\u770bArgon\u4e3b\u9898\u7684\u9996\u9875\u6a21\u677findex.php\uff0c\u627e\u5230\u4e86\u67e5\u8be2\u6587\u7ae0\u7684\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t&lt;?php if ( have_posts() ) : ?>\n\t\t&lt;?php\n\t\t\twhile ( have_posts() ) :\n\t\t\t\tthe_post();\n\t\t\t\tif (get_post_type() == 'shuoshuo'){\n\t\t\t\t\tget_template_part( 'template-parts\/content-shuoshuo-preview' );\n\t\t\t\t}else{\n\t\t\t\t\tget_template_part( 'template-parts\/content-preview', get_option('argon_article_list_layout', '1'));\n\t\t\t\t}\n\t\t\tendwhile;\n\t\t?>\n\t\t&lt;?php\n\t\t\techo get_argon_formatted_paginate_links_for_all_platforms();\n\t\t?>\n\t\t&lt;?php\n\tendif;\n\t?><\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u80fd\u591f\u628a\u8fd9\u4e2a\u4ee3\u7801\u642c\u5230\u522b\u7684\u9875\u9762\u6a21\u677f\uff0c\u90a3\u4e48\u8fd9\u4e2a\u9875\u9762\u4e5f\u5fc5\u7136\u4f1a\u51fa\u73b0\u4e00\u6837\u7684\u6700\u65b0\u524d\u5341\u7bc7\u6587\u7ae0\u5361\u7247\u2026\u2026\u5417\uff1f\u5c31\u62ff\u96e8\u57ce\u5e7f\u573a\u677f\u5757\u4e3a\u4f8b\u5427\uff0c\u6211\u628aWordPress\u81ea\u5e26\u7684\u5f52\u6863\u65f6\u95f4\u8f74\u6a21\u677f\u590d\u5236\u4e86\u4e00\u4efd\uff0c\u6539\u6210\u96e8\u57ce\u5e7f\u573a\u7684\u6a21\u677f\uff0c\u8fd9\u4e2a\u6a21\u677f\u4e3b\u8981\u5206\u4e3a\u4e24\u90e8\u5206\uff0c\u9996\u5148\u662f\u201c\u5bfc\u8bed\u201d\uff0c\u5c31\u662f\u5bf9\u96e8\u57ce\u5e7f\u573a\u7b80\u8981\u4ecb\u7ecd\u7684\u5185\u5bb9\uff08\u201c\u535a\u5ba2\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a\u4eba\u7684\u5e73\u53f0\u2026\u2026\u201d\u8fd9\u4e00\u5757\uff09\uff0c\u5bfc\u8bed\u7ed3\u675f\u540e\u5c31\u662f\u6587\u7ae0\u5361\u7247\uff0c\u6700\u521d\u662f\u5199\u6210\u8fd9\u6837\u5b50\u7684\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php \n\/*\nTemplate Name: \u96e8\u57ce\u5e7f\u573a\u9875\u9762\u6a21\u677f\n*\/\n?>\n\n&lt;?php get_header(); ?>\n\n&lt;div class=\"page-information-card-container\">&lt;\/div>\n\n&lt;?php get_sidebar(); ?>\n\n\n&lt;div id=\"primary\" class=\"content-area\">\n    &lt;!-- 1\ufe0f\u20e3 \u6309\u7167\u4e3b\u9898\u9ed8\u8ba4\u6837\u5f0f\u663e\u793a\u53e4\u817e\u5821\u7f16\u8f91\u5668\u91cc\u7f16\u8f91\u7684\u9875\u9762\u5185\u5bb9 -->\n &lt;div class=\"entry-content page-content\">\n     &lt;?php\n\t\t\t\/\/ \u4f7f\u7528\u4e3b\u9898\u81ea\u5e26\u7684 page \u5185\u5bb9\u6a21\u677f\uff08\u81ea\u52a8\u5305\u542b\u6807\u9898\u3001\u5185\u5bb9\u3001\u6240\u6709\u6837\u5f0f\uff09\n\t\t\tget_template_part( 'template-parts\/content', 'page' );\n\t?>\n&lt;\/div>\n&lt;!-- 2\ufe0f\u20e3 \u663e\u793a\u6700\u65b0\u6587\u7ae0\u5217\u8868\uff08\u7c7b\u4f3c\u9996\u9875\u6837\u5f0f\uff09 -->\n\t&lt;main id=\"main\" class=\"site-main\" role=\"main\">\n\n\t&lt;?php if ( have_posts() ) : ?>\n\t\t&lt;?php\n\t\t\twhile ( have_posts() ) :\n\t\t\t\tthe_post();\n\t\t\t\tif (get_post_type() == 'shuoshuo'){\n\t\t\t\t\tget_template_part( 'template-parts\/content-shuoshuo-preview' );\n\t\t\t\t}else{\n\t\t\t\t\tget_template_part( 'template-parts\/content-preview', get_option('argon_article_list_layout', '1'));\n\t\t\t\t}\n\t\t\tendwhile;\n\t\t?>\n\t\t&lt;?php\n\t\t\techo get_argon_formatted_paginate_links_for_all_platforms();\n\t\t?>\n\t\t&lt;?php\n\tendif;\n\t?>\n\t&lt;\/main>\n\t&lt;\/div>\n\t&lt;?php get_footer(); ?><\/code><\/pre>\n\n\n\n<p>\u7b2c\u4e8c\u90e8\u5206\u6211\u662f\u76f4\u63a5\u590d\u5236\u4e86\uff0c\u4f46\u662f\u6700\u540e\u53d1\u73b0\u4ec0\u4e48\u90fd\u6ca1\u6709\u663e\u793a\uff0c\u611f\u8c22AI\u73af\u8282\u6765\u4e86\uff0cds\u662f\u8fd9\u4e48\u8bf4\u7684\uff1a<\/p>\n\n\n\n<p>\u95ee\u9898\u4e3b\u8981\u51fa\u5728\u00a0<strong>WordPress \u7684\u4e3b\u5faa\u73af\uff08Main Query\uff09<\/strong>\u00a0\u4e0a\u3002\u5f53\u4f60\u628a\u9996\u9875\uff08<code>index.php<\/code>\u00a0\u6216\u00a0<code>home.php<\/code>\uff09\u7684\u4ee3\u7801\u539f\u5c01\u4e0d\u52a8\u5730\u590d\u5236\u5230<strong>\u9875\u9762\u6a21\u677f<\/strong>\u4e2d\u65f6\uff0c<code>have_posts()<\/code>\u00a0\u67e5\u8be2\u7684\u5e76\u4e0d\u662f\u6240\u6709\u6587\u7ae0\uff0c\u800c\u662f\u5f53\u524d\u8fd9\u4e2a\u300c\u9875\u9762\u300d\u672c\u8eab\u3002<\/p>\n\n\n\n<p>\u6309\u6211\u7684\u7406\u89e3\uff0c\u53ea\u6709\u9996\u9875\u624d\u80fd\u901a\u8fc7\u8fd9\u4e32\u4ee3\u7801\u53bb\u67e5\u8be2\u5230\u6587\u7ae0\uff0c\u5355\u72ec\u7684\u4e00\u4e2a\u975e\u9996\u9875\u7684\u9875\u9762\u65f6\u65e0\u6cd5\u67e5\u8be2\u7684\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u7ed9\u8fd9\u4e2a\u9875\u9762\u72ec\u7acb\u5199\u4e00\u4e2a\u6587\u7ae0\u67e5\u8be2\u7684\u903b\u8f91\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>&lt;!-- 2\ufe0f\u20e3 \u663e\u793a\u6700\u65b0\u6587\u7ae0\u5217\u8868\uff08\u7c7b\u4f3c\u9996\u9875\u6837\u5f0f\uff09 --&gt;<\/em>\n&lt;div id=\"primary\" class=\"content-area\"&gt;\n\t&lt;main id=\"main\" class=\"site-main article-list article-list-home\" role=\"main\"&gt;\n\n\t&lt;?php\n\t<em>\/\/ \u81ea\u5b9a\u4e49\u67e5\u8be2\uff1a\u83b7\u53d6\u6700\u65b0\u7684\u6587\u7ae0\uff08\u4e0d\u5305\u62ec\u5f53\u524d\u9875\u9762\uff09<\/em>\n\t$args = array(\n\t\t'post_type'      =&gt; array('post', 'shuoshuo'), <em>\/\/ \u540c\u65f6\u663e\u793a\u666e\u901a\u6587\u7ae0\u548c\u201c\u8bf4\u8bf4\u201d<\/em>\n\t\t'posts_per_page' =&gt; 10,                         <em>\/\/ \u6bcf\u9875\u663e\u793a\u6570\u91cf\uff0c\u53ef\u6539\u6210 -1 \u663e\u793a\u5168\u90e8<\/em>\n\t\t'paged'          =&gt; get_query_var('paged') ? get_query_var('paged') : 1,\n\t\t'post__not_in'   =&gt; array( get_the_ID() ),      <em>\/\/ \u6392\u9664\u5f53\u524d\u9875\u9762\u81ea\u8eab\uff08\u907f\u514d\u91cd\u590d\uff09<\/em>\n\t);\n\t$custom_query = new WP_Query( $args );\n\n\tif ( $custom_query-&gt;have_posts() ) :\n\t\twhile ( $custom_query-&gt;have_posts() ) :\n\t\t\t$custom_query-&gt;the_post();\n\n\t\t\tif ( get_post_type() == 'shuoshuo' ) {\n\t\t\t\tget_template_part( 'template-parts\/content-shuoshuo-preview' );\n\t\t\t} else {\n\t\t\t\tget_template_part( 'template-parts\/content-preview', get_option('argon_article_list_layout', '1') );\n\t\t\t}\n\t\tendwhile;\n\n\t\t<em>\/\/ \u5206\u9875\u5bfc\u822a\uff08\u9002\u914d\u81ea\u5b9a\u4e49\u67e5\u8be2\uff09<\/em>\n\t\techo paginate_links( array(\n\t\t\t'total'   =&gt; $custom_query-&gt;max_num_pages,\n\t\t\t'current' =&gt; max( 1, get_query_var('paged') ),\n\t\t\t'format'  =&gt; '?paged=%#%',\n\t\t) );\n\n\telse :\n\t\techo '&lt;p&gt;\u8fd8\u6ca1\u6709\u6587\u7ae0\uff0c\u7a0d\u540e\u518d\u6765\u770b\u770b\u5427\uff01&lt;\/p&gt;';\n\tendif;\n\n\twp_reset_postdata(); <em>\/\/ \u91cd\u7f6e\u67e5\u8be2\uff0c\u907f\u514d\u5f71\u54cd\u4fa7\u8fb9\u680f\u7b49\u5176\u4ed6\u5730\u65b9<\/em>\n\t?&gt;<\/code><\/pre>\n\n\n\n<p>AI\u5206\u6790\u662f\u8fd9\u6837\u7684\uff0c\u7ecf\u8fc7\u8fd9\u6837\u5b50\u4fee\u6539\u540e\uff0c\u786e\u5b9e\u5c31\u51fa\u73b0\u6587\u7ae0\u5361\u7247\u4e86\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">\u539f\u6765\u7684\u9996\u9875\u6a21\u677f<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u4fee\u6b63\u540e\u7684\u9875\u9762\u6a21\u677f<\/th><\/tr><\/thead><tbody><tr><td><code>have_posts()<\/code>&nbsp;\u4e3b\u5faa\u73af = \u5f53\u524d\u9875\u9762\u7684\u6570\u636e<\/td><td>\u7b2c\u4e00\u4e2a\u5faa\u73af\u7528&nbsp;<code>the_content()<\/code>&nbsp;\u8f93\u51fa\u4f60\u7f16\u8f91\u7684\u9875\u9762\u5185\u5bb9<\/td><\/tr><tr><td>\u6ca1\u6709\u00a0<code>the_content()<\/code>\uff0c\u6240\u4ee5\u53e4\u817e\u5821\u5185\u5bb9\u4e0d\u663e\u793a\uff08\u8fd9\u4e2a\u662f\u5bfc\u8bed\u90e8\u5206\uff0c\u4e0e\u6587\u7ae0\u67e5\u8be2\u65e0\u5173\uff09<\/td><td>\u7136\u540e\u65b0\u5efa&nbsp;<code>WP_Query<\/code>&nbsp;\u5355\u72ec\u83b7\u53d6\u6240\u6709\u6587\u7ae0\uff08\u6216\u6307\u5b9a\u7c7b\u578b\uff09<\/td><\/tr><tr><td>\u4e3b\u5faa\u73af\u91cc\u62ff\u4e0d\u5230\u6587\u7ae0\uff0c\u6240\u4ee5\u6ca1\u6709\u5217\u8868<\/td><td>\u7528&nbsp;<code>get_template_part()<\/code>&nbsp;\u590d\u7528\u4e3b\u9898\u81ea\u5e26\u7684\u9884\u89c8\u6837\u5f0f\uff0c\u548c\u9996\u9875\u4e00\u6837<\/td><\/tr><tr><td>\u65e0\u6cd5\u5206\u9875\uff08\u5206\u9875\u662f\u9488\u5bf9\u9996\u9875\u6587\u7ae0\u6d41\u7684\uff09<\/td><td>\u81ea\u5b9a\u4e49\u67e5\u8be2\u65f6\u5e26\u4e0a&nbsp;<code>paged<\/code>&nbsp;\u53c2\u6570\uff0c\u5206\u9875\u4e5f\u80fd\u6b63\u5e38\u5de5\u4f5c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u90a3\u4e48\u63a5\u4e0b\u6765\u5c31\u8981\u89e3\u51b3\u67e5\u8be2\u6307\u5b9a\u5206\u7c7b\u7684\u6587\u7ae0\uff0cWordPress\u7ed9\u6bcf\u4e00\u4e2a\u5206\u7c7b\uff08category\uff09\u90fd\u8d4b\u4e88\u4e86\u4e00\u4e2a\u6570\u5b57id\uff0c\u56e0\u6b64\u53ea\u9700\u8981\u5728\u67e5\u8be2\u4ee3\u7801\u4e2d\u52a0\u4e0a\u4e00\u884c\u6307\u5b9aid\u5c31\u884c\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n<em>\/\/ \u81ea\u5b9a\u4e49\u67e5\u8be2\uff1a\u53ea\u83b7\u53d6\u7279\u5b9a\u5206\u7c7b\uff08\u4f8b\u5982 ID \u4e3a 5\uff09\u4e0b\u7684\u6700\u65b0\u6587\u7ae0<\/em>\n$args = array(\n    'cat'            =&gt; 5, <em>\/\/ \u2705 \u91cd\u70b9\uff1a\u53ea\u663e\u793a\u5206\u7c7bID\u4e3a5\u7684\u6587\u7ae0<\/em>\n    'post_type'      =&gt; array('post', 'shuoshuo'),\n    'posts_per_page' =&gt; 10,\n    'paged'          =&gt; $paged,\n    'post__not_in'   =&gt; array( get_the_ID() ),\n);\n$custom_query = new WP_Query( $args );\n<em>\/\/ ... \u540e\u7eed\u7684\u5faa\u73af\u4ee3\u7801\u4fdd\u6301\u4e0d\u53d8<\/em>\n?&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 \u5361\u7247\u5e03\u5c40<\/h3>\n\n\n\n<p>\u73b0\u5728\u518d\u89e3\u51b3\u6587\u7ae0\u5361\u7247\u7684\u5e03\u5c40\u95ee\u9898\uff0c\u7ecf\u8fc71.1\u7684\u5904\u7406\uff0c\u73b0\u5728\u7684\u6587\u7ae0\u5361\u7247\u90fd\u662f\u4ee5\u5355\u680f\u7684\u5f62\u5f0f\u5448\u73b0\uff0c\u6211\u4e2a\u4eba\u611f\u89c9\u6587\u7ae0\u591a\u8d77\u6765\u7684\u8bdd\u8fd8\u662f\u53cc\u680f\u66f4\u597d\u770b\uff0c\u56e0\u6b64\uff0c\u6700\u65b9\u4fbf\u7684\u529e\u6cd5\u5e94\u8be5\u5c31\u662f\u7ed9\u8fd9\u4e2a\u9875\u9762\u52a0css\u4e86\uff0c\u7ee7\u7eed\u4ea4\u7ed9AI\u4e86\uff0cAI\u7ed9\u4e86\u4e00\u4e2atwo-column-card-list\u7cfb\u5217\u7684css\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* \u53cc\u680f\u5361\u7247\u7f51\u683c *\/\n.two-column-card-list .site-main {\n    display: grid;\n    grid-template-columns: repeat(2, 1fr);\n    gap: 24px;\n}\n\n\/* \u786e\u4fdd\u6bcf\u4e2a\u5361\u7247\u5360\u6ee1\u7f51\u683c\u533a\u57df\uff0c\u5e76\u4fdd\u6301\u539f\u6709\u6837\u5f0f *\/\n.two-column-card-list .post-card,\n.two-column-card-list article {\n    width: 100%;\n    margin: 0;\n    height: auto;\n}\n\n\/* \u624b\u673a\u7aef\u81ea\u52a8\u53d8\u56de\u5355\u680f *\/\n@media (max-width: 768px) {\n    .two-column-card-list .site-main {\n        grid-template-columns: 1fr;\n        gap: 20px;\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u5728\u96e8\u57ce\u5e7f\u573a\u9875\u9762\u6a21\u677f\u7684PHP\u6587\u4ef6\u91cc\u7684\u6587\u7ae0\u67e5\u8be2\u90e8\u5206\u5957\u4e0adiv\u6807\u7b7e\uff0c\u542f\u7528\u8fd9\u4e2acss\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"two-column-card-list\">\n    &lt;main id=\"main\" class=\"site-main\" role=\"main\">\n        &lt;?php\n        <em>\/\/ \u81ea\u5b9a\u4e49\u67e5\u8be2\u4fdd\u6301\u4e0d\u53d8...<\/em>\n        ?>\n    &lt;\/main>\n&lt;\/div><\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\u5b50\u5c31\u6709\u53cc\u680f\u5e03\u5c40\u4e86\uff0c\u4e0d\u8fc7\u8fd8\u662f\u4f1a\u548c\u9996\u9875\u4e0d\u540c\u7684\uff0c\u9996\u9875\u4f1a\u6839\u636e\u6587\u7ae0\u6807\u9898\u56fe\u7247\u7684\u5206\u8fa8\u7387\u4e0d\u540c\uff0c\u6bcf\u4e00\u4e2a\u6587\u7ae0\u5361\u7247\u7684\u9ad8\u5ea6\u4e0d\u4e00\u5b9a\u76f8\u540c\uff0c\u4f46\u662f\u6211\u4eec\u7684css\u91cc\u9762\u9ad8\u5ea6\u662fauto\uff0c\u4f46\u662f\u5f53\u6211\u4e0d\u914d\u56fe\u65f6\uff0c\u4e0d\u914d\u56fe\u7684\u6587\u7ae0\u4f9d\u7136\u4f1a\u548c\u6709\u56fe\u7247\u7684\u6587\u7ae0\u540c\u9ad8\uff0c\u8fd9\u662f\u6211\u76ee\u524d\u641e\u4e0d\u61c2\u7684\u95ee\u9898\u4e86\uff0c\u6682\u4e14\u4e0d\u7ba1\uff0c\u4fdd\u7559\u4e86\uff0c\u6bd5\u7adf\u73b0\u5728\u7684\u6548\u679c\u5df2\u7ecf\u5f88\u597d\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2 \u67e5\u8be2\u5206\u9875\u4f18\u5316<\/h2>\n\n\n\n<p>\u6700\u8fd1\u6211\u8bd5\u4e86\u4e00\u4e0b\u585e\u4e86\u5341\u51e0\u7bc7\u6587\u7ae0\uff0c\u53d1\u73b0\u5206\u9875\u6548\u679c\u4e0d\u662f\u5f88\u597d\uff0c\u56e0\u4e3a\u6211\u4eec\u7684\u4e3b\u9898\u8d85\u94fe\u63a5\u914d\u7684\u662f\u7c89\u8272\uff0c\u4e0e\u7f51\u7ad9\u80cc\u666f\u56fe\u9ad8\u5ea6\u6df7\u5408\uff0c\u6240\u4ee5\u6211\u5c31\u4e3a\u9875\u9762\u9009\u62e9\u7ee7\u7eed\u6dfb\u52a0css\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* \u5206\u9875\u5bb9\u5668\uff1a\u5c45\u4e2d\u5bf9\u9f50\u3001\u7559\u767d *\/\n.custom-pagination {\n    text-align: center;\n    margin: 40px 0 20px;\n    font-size: 0;  \/* \u6d88\u9664 inline-block \u95f4\u9699 *\/\n}\n\n\/* \u6bcf\u4e2a\u5206\u9875\u9879\uff08\u5305\u62ec\u9875\u7801\u3001\u4e0a\u4e00\u9875\/\u4e0b\u4e00\u9875\uff09 *\/\n.custom-pagination .page-numbers {\n    display: inline-block;\n    font-size: 16px;\n    padding: 8px 14px;\n    margin: 0 4px;\n    background: #f5f5f5;\n    color: #333;\n    border-radius: 4px;\n    text-decoration: none;\n    transition: all 0.2s ease;\n    border: 1px solid #e0e0e0;\n    font-weight: normal;\n}\n\n\/* \u5f53\u524d\u9875\uff08\u9ad8\u4eae\u9192\u76ee\uff09 *\/\n.custom-pagination .page-numbers.current {\n    background: #0073aa;   \/* Argon \u4e3b\u8272\u8c03\u53ef\u81ea\u884c\u4fee\u6539 *\/\n    border-color: #0073aa;\n    color: #fff;\n    font-weight: bold;\n    box-shadow: 0 2px 6px rgba(0,115,170,0.3);\n}\n\n\/* \u4e0a\u4e00\u9875 \/ \u4e0b\u4e00\u9875 \u6309\u94ae *\/\n.custom-pagination .page-numbers.prev,\n.custom-pagination .page-numbers.next {\n    background: #ffffff;\n    border-color: #cccccc;\n    font-weight: 500;\n    padding: 8px 18px;\n}\n\n\/* \u60ac\u505c\u6548\u679c *\/\n.custom-pagination a.page-numbers:hover {\n    background: #0073aa;\n    color: #fff;\n    border-color: #0073aa;\n    transform: translateY(-2px);\n    box-shadow: 0 4px 8px rgba(0,0,0,0.1);\n}\n\n\/* \u7981\u7528\u72b6\u6001\uff08\u5982\u6ca1\u6709\u4e0b\u4e00\u9875\u65f6\u663e\u793a\u7684span\uff09 *\/\n.custom-pagination .page-numbers.dots {\n    background: transparent;\n    border-color: transparent;\n    cursor: default;\n}<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5728PHP\u5206\u9875\u51fd\u6570\u52a0\u4e0a\u4e0a\u9762\u7684css\u6807\u7b7e\uff1a\u5728\u00a0echo paginate_links(&#8230;);\u00a0\u5916\u9762\u5305\u88f9\u4e00\u4e2a\u00a0&lt;div class=&#8221;custom-pagination&#8221;>\uff0c\u5e76\u8c03\u6574\u00a0prev_text\u00a0\/\u00a0next_text\u00a0\u53c2\u6570\uff0c\u8ba9\u6309\u94ae\u66f4\u6613\u4e8e\u70b9\u51fb\u548c\u8bc6\u522b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u5206\u9875\u5bfc\u822a\uff08\u81ea\u5b9a\u4e49\u6837\u5f0f\uff09\necho '&lt;div class=\"custom-pagination\">';\necho paginate_links( array(\n    'total'        => $custom_query->max_num_pages,\n    'current'      => max( 1, get_query_var('paged') ),\n    'format'       => '?paged=%#%',\n    'prev_text'    => '\u2190 \u4e0a\u4e00\u9875',   \/\/ \u53ef\u6539\u7528\u56fe\u6807\uff0c\u4f8b\u5982 '\u2190' \u6216 Font Awesome \u7684 '&lt;i class=\"fa fa-chevron-left\">&lt;\/i> \u4e0a\u4e00\u9875'\n    'next_text'    => '\u4e0b\u4e00\u9875 \u2192',\n    'mid_size'     => 2,            \/\/ \u5f53\u524d\u9875\u5de6\u53f3\u663e\u793a\u51e0\u4e2a\u9875\u7801\n    'end_size'     => 1,            \/\/ \u4e24\u7aef\u663e\u793a\u51e0\u4e2a\u9875\u7801\n    'type'         => 'plain',      \/\/ \u4fdd\u8bc1\u8f93\u51faHTML\u662fa\/span\uff0c\u518d\u7531CSS\u7edf\u4e00\u6837\u5f0f\n) );\necho '&lt;\/div>';<\/code><\/pre>\n\n\n\n<p>\u5b8c\u6210\u540e\u6548\u679c\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.yukimia.top\/wp-content\/uploads\/2026\/05\/\u96e8\u4e4b\u5ead\u9875\u9762\u677f\u5757\u7684\u8bbe\u8ba1\u56fe1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"368\" height=\"101\" data-original=\"https:\/\/www.yukimia.top\/wp-content\/uploads\/2026\/05\/\u96e8\u4e4b\u5ead\u9875\u9762\u677f\u5757\u7684\u8bbe\u8ba1\u56fe1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-460\"  sizes=\"auto, (max-width: 368px) 100vw, 368px\" \/><\/div><\/figure>\n<\/div>\n\n\n<p>\u6211\u4e5f\u9a8c\u8bc1\u8fc7\u4e86\uff0c\u9875\u9762\u53d8\u591a\u4e4b\u540e\uff0c\u6570\u5b57\u4e2d\u95f4\u4f1a\u51fa\u73b0\u2026\u2026\u7701\u7565\u53f7\u7684\uff0c\u8fd9\u4e2a\u95ee\u9898\u4e5f\u5c31\u89e3\u51b3\u4e86\u3002<\/p>\n\n\n\n<p>\u4e0d\u8fc7\u672c\u4eba\u6446\u70c2\u6ca1\u6709\u8fdb\u4e00\u6b65\u5f04\u4e86\uff0c\u5c31\u662f\u5982\u679c\u6587\u7ae0\u672a\u6765\u53d8\u5f97\u5f88\u591a\uff0c\u9875\u9762\u4e5f\u5f88\u591a\uff0c\u7528\u6237\u60f3\u8981\u81ea\u5b9a\u4e49\u8f93\u5165\u9875\u7801\u8fdb\u884c\u8df3\u8f6c\u80fd\u5426\u5b9e\u73b0\u5462\uff1f\u5f53\u7136\u53ef\u4ee5\uff0c\u4e0d\u8fc7\uff0c\u96e8\u4e4b\u5ead\u5e94\u8be5\u4e0d\u9700\u8981\u90a3\u4e2a\u4e1c\u897f\u5427\u2026\u2026<\/p>\n\n\n\n<p>\u6240\u4ee5\uff0c\u5c31\u5230\u8fd9\u91cc\u5427\uff0c\u90a3\u4e2a\u529f\u80fd\u6ca1\u5fc5\u8981\u505a\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u96e8\u4e4b\u5ead\u91c7\u7528WordPress\u5efa\u7ad9\uff0c\u5e76\u4f7f\u7528\u4e3b\u9898\u975e\u5e38\u7cbe\u81f4\u7f8e\u89c2\u7684Argon\u4e3b\u9898\uff08\u5728\u6b64\u611f\u8c22solstice23\u7684\u5f00\u6e90\uff09 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":461,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,16],"tags":[],"class_list":["post-450","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-18","category-16"],"_links":{"self":[{"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/posts\/450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=450"}],"version-history":[{"count":10,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/posts\/450\/revisions"}],"predecessor-version":[{"id":462,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/posts\/450\/revisions\/462"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=\/wp\/v2\/media\/461"}],"wp:attachment":[{"href":"https:\/\/www.yukimia.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yukimia.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}