{"id":1719,"date":"2023-10-09T21:23:51","date_gmt":"2023-10-09T13:23:51","guid":{"rendered":"https:\/\/wpeyes.com\/wordpress\/?p=1719"},"modified":"2023-10-09T21:24:06","modified_gmt":"2023-10-09T13:24:06","slug":"%e5%9c%a8-wordpress-%e4%b8%ad%e4%bd%bf%e7%94%a8%e7%bd%ae%e9%a1%b6%e5%b8%96%e5%ad%90%e5%8f%af%e4%bb%a5%e5%81%9a%e7%9a%84-6-%e4%bb%b6%e5%be%88%e9%85%b7%e7%9a%84%e4%ba%8b%e6%83%85","status":"publish","type":"post","link":"https:\/\/wpeyes.com\/wordpress\/archives\/1719","title":{"rendered":"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5"},"content":{"rendered":"\n<p>\u60a8\u662f\u5426\u60f3\u77e5\u9053\u53ef\u4ee5\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u505a\u4ec0\u4e48\uff1f<\/p>\n\n\n\n<p>\u7c98\u6027\u5e16\u5b50\u662f WordPress \u4e2d\u6700\u4e0d\u4e3a\u4eba\u6240\u77e5\u7684\u529f\u80fd\u4e4b\u4e00\uff0c\u4f46\u5b83\u4eec\u786e\u5b9e\u5bf9\u60a8\u7684\u7f51\u7ad9\u6709\u76ca\u3002\u4f7f\u7528\u5b83\u4eec\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7684\u53d7\u4f17\u4fdd\u6301\u91cd\u8981\u5185\u5bb9\u7684\u53ef\u89c1\u6027\uff0c\u4ece\u800c\u63d0\u9ad8\u8f6c\u5316\u7387\u548c\u53c2\u4e0e\u5ea6\u3002<\/p>\n\n\n\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u5411\u60a8\u5c55\u793a\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts-in-wordpress.png\" alt=\"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u4e00\u4e9b\u5f88\u9177\u7684\u4e8b\u60c5\" class=\"wp-image-137610\" title=\"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u4e00\u4e9b\u5f88\u9177\u7684\u4e8b\u60c5\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u4ec0\u4e48\u662f\u7c98\u6027\u5e16\u5b50\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u8981\u4f7f\u7528\u5b83\u4eec\uff1f<\/h4>\n\n\n\n<p><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/how-to-make-sticky-posts-in-wordpress\/\">\u7f6e\u9876\u5e16\u5b50<\/a>\u662f\u6307\u7c98\u8d34\u5728\u60a8\u7f51\u7ad9\u535a\u5ba2\u9875\u9762\u9876\u90e8\u7684\u4efb\u4f55\u5185\u5bb9\u3002\u60a8\u8fd8\u53ef\u4ee5\u5728\u4e3b\u9875\u3001\u7c7b\u522b\u3001\u5b58\u6863\u548c\u5176\u4ed6\u9875\u9762\u4e0a\u663e\u793a\u5b83\u4eec\u3002<\/p>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u9009\u62e9\u7c98\u8d34<a href=\"https:\/\/www.wpbeginner.com\/guides\/\">WordPress \u7f51\u7ad9<\/a>\u7684\u652f\u67f1\u6587\u7ae0\u3001<a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-display-popular-products-on-woocommerce-product-pages\/\">\u70ed\u95e8\u4ea7\u54c1<\/a>\u3001\u516c\u544a\u6216\u6298\u6263\u4f18\u60e0\uff0c\u4ee5\u4fbf\u5438\u5f15\u66f4\u591a\u4eba\u5173\u6ce8\u5b83\u4eec\u3002<\/p>\n\n\n\n<p>\u7c98\u6027\u5e16\u5b50\u975e\u5e38\u5f3a\u5927\uff0c\u56e0\u4e3a\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\uff0c\u60a8\u521b\u5efa\u7684\u5185\u5bb9\u8d8a\u6765\u8d8a\u591a\uff0c\u60a8\u7684\u65e7\u6587\u7ae0\u4f1a\u88ab\u57cb\u5728\u65b0\u535a\u5ba2\u6587\u7ae0\u4e0b\u9762\u3002\u56e0\u6b64\uff0c\u7528\u6237\u53ef\u80fd\u4e0d\u77e5\u9053\u60a8\u7684\u70ed\u95e8\u6587\u7ae0\uff0c\u5e76\u4e14\u5f88\u96be\u5728\u60a8\u7684\u7f51\u7ad9\u4e0a\u627e\u5230\u8fd9\u4e9b\u6587\u7ae0\u3002<\/p>\n\n\n\n<p>\u7136\u800c\uff0c\u8bb8\u591a\u7f51\u7ad9\u6240\u6709\u8005\u4e0d\u77e5\u9053\u5982\u4f55\u5145\u5206\u5229\u7528 WordPress \u4e2d\u7684\u7f6e\u9876\u5e16\u5b50\u529f\u80fd\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u7f6e\u9876\u5e16\u505a\u4e00\u4e9b\u5f88\u9177\u7684\u4e8b\u60c5\u3002<\/p>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u5355\u51fb\u4e0b\u9762\u7684\u94fe\u63a5\u8df3\u8f6c\u5230\u60a8\u611f\u5174\u8da3\u7684\u4efb\u4f55\u90e8\u5206\uff1a<\/p>\n\n\n\n<ul>\n<li><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/6-cool-things-you-can-do-with-sticky-posts-in-wordpress\/#display-sticky-post-sidebar\">\u5728\u4fa7\u8fb9\u680f\u4e0a\u5c06\u7f6e\u9876\u5e16\u5b50\u663e\u793a\u4e3a\u6700\u8fd1\u7684\u6587\u7ae0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/6-cool-things-you-can-do-with-sticky-posts-in-wordpress\/#sticky-post-for-categories\">\u7c7b\u522b\u7f6e\u9876\u5e16<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/6-cool-things-you-can-do-with-sticky-posts-in-wordpress\/#display-latest-sticky-post\">\u663e\u793a\u6700\u65b0\u7f6e\u9876\u5e16\u5b50<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/6-cool-things-you-can-do-with-sticky-posts-in-wordpress\/#sticky-post-for-custom-post\">\u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\u7684\u7c98\u6027\u5e16\u5b50<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/6-cool-things-you-can-do-with-sticky-posts-in-wordpress\/#hide-sticky-post-from-loop\">\u5982\u4f55\u9690\u85cf WordPress \u5faa\u73af\u4e2d\u7684\u7c98\u6027\u5e16\u5b50<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/6-cool-things-you-can-do-with-sticky-posts-in-wordpress\/#styling-sticky-post\">\u5728 WordPress \u4e2d\u8bbe\u7f6e\u7c98\u6027\u5e16\u5b50\u7684\u6837\u5f0f<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"display-sticky-post-sidebar\">1. \u5728\u4fa7\u8fb9\u680f\u4e0a\u5c06\u7f6e\u9876\u5e16\u5b50\u663e\u793a\u4e3a\u6700\u8fd1\u6587\u7ae0<\/h4>\n\n\n\n<p>WordPress \u5728\u60a8\u7f51\u7ad9\u4e0a\u7684\u535a\u5ba2\u6587\u7ae0\u9875\u9762\u9876\u90e8\u663e\u793a\u60a8\u7684\u7f6e\u9876\u5e16\u5b50\u3002\u4f46\u662f\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5c06\u5b83\u4eec\u663e\u793a\u5728\u7f51\u7ad9\u4fa7\u8fb9\u680f\u4e2d\u4f5c\u4e3a\u6700\u65b0\u6587\u7ae0\u3002<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u5e76\u6fc0\u6d3b<a href=\"https:\/\/wordpress.org\/plugins\/recent-posts-widget-with-thumbnails\/#description\" target=\"_blank\" rel=\"noreferrer noopener\">\u5e26\u6709\u7f29\u7565\u56fe\u63d2\u4ef6\u7684\u6700\u8fd1\u5e16\u5b50\u5c0f\u90e8\u4ef6<\/a>\u3002\u5982\u679c\u60a8\u9700\u8981\u5e2e\u52a9\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u6709\u5173<a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners\/\">\u5982\u4f55\u5b89\u88c5 WordPress \u63d2\u4ef6\u7684<\/a>\u6307\u5357\u3002<\/p>\n\n\n\n<p>\u6fc0\u6d3b\u540e\uff0c\u60a8\u53ef\u4ee5\u4ece WordPress \u7ba1\u7406\u9762\u677f\u524d\u5f80<strong>\u5916\u89c2 \u00bb \u5c0f\u90e8\u4ef6\u3002<\/strong>\u63a5\u4e0b\u6765\uff0c\u60a8\u53ef\u4ee5\u5355\u51fb\u201c+\u201d\u53f7\u5e76\u6dfb\u52a0\u201c\u5e26\u6709\u7f29\u7565\u56fe\u7684\u6700\u8fd1\u5e16\u5b50\u201d\u5c0f\u90e8\u4ef6\u5757\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/add-recent-posts-with-thumbnails-widget-block-1.png\" alt=\"\u4f7f\u7528\u7f29\u7565\u56fe\u5c0f\u90e8\u4ef6\u5757\u6dfb\u52a0\u6700\u8fd1\u7684\u5e16\u5b50\" class=\"wp-image-137604\" title=\"\u4f7f\u7528\u7f29\u7565\u56fe\u5c0f\u90e8\u4ef6\u5757\u6dfb\u52a0\u6700\u8fd1\u7684\u5e16\u5b50\"\/><\/figure>\n\n\n\n<p>\u5728\u5c0f\u90e8\u4ef6\u5757\u8bbe\u7f6e\u4e2d\uff0c\u60a8\u53ef\u4ee5\u8f93\u5165\u6807\u9898\uff08\u4f8b\u5982\u201c\u6700\u8fd1\u7684\u5e16\u5b50\u201d\uff09\u5e76\u9009\u62e9\u8981\u663e\u793a\u7684\u5e16\u5b50\u6570\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765\uff0c\u5411\u4e0b\u6eda\u52a8\u5230\u5c0f\u90e8\u4ef6\u8bbe\u7f6e\u4e2d\u7684\u201c\u7c98\u6027\u201d\u90e8\u5206\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u542f\u7528\u8be5\u9009\u9879\uff0c\u4ec5\u5c06\u7f6e\u9876\u5e16\u5b50\u663e\u793a\u4e3a\u6700\u8fd1\u7684\u5e16\u5b50\uff0c\u5e76\u5c06\u5176\u4fdd\u7559\u5728\u5217\u8868\u9876\u90e8\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/show-sticky-posts-as-recent-posts.png\" alt=\"\u5c06\u7f6e\u9876\u5e16\u5b50\u663e\u793a\u4e3a\u6700\u8fd1\u7684\u5e16\u5b50\" class=\"wp-image-137606\" title=\"\u5c06\u7f6e\u9876\u5e16\u5b50\u663e\u793a\u4e3a\u6700\u8fd1\u7684\u5e16\u5b50\"\/><\/figure>\n\n\n\n<p>\u5b8c\u6210\u540e\uff0c\u53ea\u9700\u5355\u51fb\u201c\u66f4\u65b0\u201d\u6309\u94ae\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u8bbf\u95ee\u60a8\u7684\u7f51\u7ad9\uff0c\u67e5\u770b\u60a8\u6807\u8bb0\u4e3a\u201c\u7f6e\u9876\u201d\u7684\u5e16\u5b50\uff0c\u8fd9\u4e9b\u5e16\u5b50\u5728\u4fa7\u8fb9\u680f\u4e2d\u663e\u793a\u4e3a\u6700\u65b0\u6587\u7ae0\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"sticky-post-for-categories\">2. \u5206\u7c7b\u7f6e\u9876\u5e16<\/h4>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u7f6e\u9876\u5e16\u5b50\u4ec5\u51fa\u73b0\u5728\u60a8\u7684<a href=\"https:\/\/www.wpbeginner.com\/start-a-wordpress-blog\/\">WordPress \u535a\u5ba2<\/a>\u7684\u9996\u9875\u4e0a\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u60f3\u5728\u7c7b\u522b\u5b58\u6863\u9875\u9762\u4e0a\u663e\u793a\u7279\u8272\u5185\u5bb9\u600e\u4e48\u529e\uff1f<\/p>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528<a href=\"https:\/\/wordpress.org\/plugins\/sticky-posts-switch\/\" target=\"_blank\" rel=\"noreferrer noopener\">Sticky Posts \u2013 Switch<\/a>\u63d2\u4ef6\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u5e76\u6fc0\u6d3b Sticky Posts \u2013 Switch \u63d2\u4ef6\u3002\u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u7684<a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners\/\">WordPress \u63d2\u4ef6\u5b89\u88c5<\/a>\u6307\u5357\u3002<\/p>\n\n\n\n<p>\u6fc0\u6d3b\u540e\uff0c\u60a8\u53ef\u4ee5\u4ece WordPress \u7ba1\u7406\u83dc\u5355\u8f6c\u5230<strong>\u8bbe\u7f6e \u00bb \u7f6e\u9876\u5e16\u5b50 \u2013 \u5207\u6362\u3002<\/strong>\u53ea\u9700\u9009\u4e2d\u201c\u7c7b\u522b\u9875\u9762\u201d\u6807\u9898\u4e0b\u7684\u201c\u7c7b\u522b\u201d\u6846\u5373\u53ef\u663e\u793a\u7f6e\u9876\u5e16\u5b50\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2014\/01\/sticky-posts-switch-settings.png\" alt=\"\u7f6e\u9876\u5e16\u5f00\u5173\u8bbe\u7f6e\" class=\"wp-image-137551\" title=\"\u7f6e\u9876\u5e16\u5f00\u5173\u8bbe\u7f6e\"\/><\/figure>\n\n\n\n<p>\u8be5\u63d2\u4ef6\u8fd8\u5728 WordPress \u4eea\u8868\u677f\u7684\u5e16\u5b50\u9875\u9762\u4e0a\u6dfb\u52a0\u4e86\u4e00\u4e2a\u661f\u5f62\u56fe\u6807\u3002<\/p>\n\n\n\n<p>\u8fd9\u6837\uff0c\u60a8\u53ea\u9700\u5355\u51fb\u56fe\u6807\u5373\u53ef\u5feb\u901f\u5c06\u5e16\u5b50\u7f6e\u9876\u3002\u60a8\u4e0d\u5fc5\u6253\u5f00\u5185\u5bb9\u7f16\u8f91\u5668\u6216\u67e5\u770b\u5feb\u901f\u7f16\u8f91\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2014\/01\/click-star-icon-to-make-post-sticky.png\" alt=\"\u5355\u51fb\u661f\u5f62\u56fe\u6807\u4f7f\u5e16\u5b50\u5177\u6709\u7c98\u6027\" class=\"wp-image-137560\" title=\"\u5355\u51fb\u661f\u5f62\u56fe\u6807\u4f7f\u5e16\u5b50\u5177\u6709\u7c98\u6027\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.wpbeginner.com\/plugins\/how-to-add-sticky-posts-for-categories-in-wordpress\/\">\u6709\u5173\u66f4\u8be6\u7ec6\u7684\u8bf4\u660e\uff0c\u8bf7\u53c2\u9605\u6709\u5173\u5982\u4f55\u5728 WordPress \u4e2d\u4e3a\u7c7b\u522b<\/a>\u6dfb\u52a0\u7f6e\u9876\u5e16\u5b50\u7684\u6559\u7a0b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"display-latest-sticky-post\">3.\u663e\u793a\u6700\u65b0\u7f6e\u9876\u5e16\u5b50<\/h4>\n\n\n\n<p>\u901a\u5e38\uff0c\u7c98\u6027\u5e16\u5b50\u7528\u4e8e\u7279\u8272\u5e16\u5b50\u4ee5\u663e\u793a\u60a8\u6700\u7a81\u51fa\u7684\u5185\u5bb9\u3002<\/p>\n\n\n\n<p>\u4e00\u6bb5\u65f6\u95f4\u540e\uff0c\u60a8\u7684\u65e7\u7cbe\u9009\u5e16\u5b50\u5c31\u4f1a\u6d88\u5931\u5728\u6863\u6848\u4e2d\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u81ea\u5b9a\u4e49\u5b58\u6863\u9875\u9762\u6216\u7f51\u7ad9\u4e0a\u7684\u5176\u4ed6\u4efb\u4f55\u4f4d\u7f6e\u663e\u793a\u65e7\u7684\u7279\u8272\u5185\u5bb9\uff0c\u4f7f\u5b83\u4eec\u6062\u590d\u751f\u673a\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u5927\u5bb6\u5728\u9700\u8981\u5904\u7406\u4ee3\u7801\u7247\u6bb5\u65f6\u4f7f\u7528<a href=\"https:\/\/wpcode.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPCode\u63d2\u4ef6\u3002<\/a>\u8bf7\u52a1\u5fc5\u9075\u5faa\u6211\u4eec\u6709\u5173<a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress\/\">\u5982\u4f55\u5c06\u7f51\u7edc\u7247\u6bb5\u7c98\u8d34\u5230 WordPress \u7684<\/a>\u6307\u5357\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/wpcode.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2012\/09\/wpcode-plugin-website.png\" alt=\"WPCode WordPress \u4ee3\u7801\u7247\u6bb5\u63d2\u4ef6\" class=\"wp-image-137142\" title=\"WPCode WordPress \u4ee3\u7801\u7247\u6bb5\u63d2\u4ef6\"\/><\/a><\/figure>\n\n\n\n<p>\u5982\u679c\u60a8\u662f\u9ad8\u7ea7\u7528\u6237\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5c06\u6b64\u4ee3\u7801\u7c98\u8d34\u5230\u4e3b\u9898\u7684<a href=\"https:\/\/www.wpbeginner.com\/glossary\/functions-php\/\">functions.php<\/a>\u6587\u4ef6\u4e2d\u3002\u4f46\u662f\uff0c\u6211\u4eec\u4e0d\u5efa\u8bae\u76f4\u63a5\u7f16\u8f91\u4e3b\u9898\u6587\u4ef6\uff0c\u56e0\u4e3a\u6700\u8f7b\u5fae\u7684\u9519\u8bef\u53ef\u80fd\u4f1a\u7834\u574f\u60a8\u7684\u7f51\u7ad9\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>123456789101112131415161718192021222324252627282930313233<\/td><td><code>function<\/code><code>wpb_latest_sticky() { <\/code><code>\/* Get all sticky posts *\/<\/code><code>$sticky<\/code><code>= get_option( <\/code><code>'sticky_posts'<\/code><code>);<\/code><code>\/* Sort the stickies with the newest ones at the top *\/<\/code><code>rsort( <\/code><code>$sticky<\/code><code>);<\/code><code>\/* Get the 5 newest stickies (change 5 for a different number) *\/<\/code><code>$sticky<\/code><code>= <\/code><code>array_slice<\/code><code>( <\/code><code>$sticky<\/code><code>, 0, 5 );<\/code><code>\/* Query sticky posts *\/<\/code><code>$the_query<\/code><code>= <\/code><code>new<\/code><code>WP_Query( <\/code><code>array<\/code><code>( <\/code><code>'post__in'<\/code><code>=&gt; <\/code><code>$sticky<\/code><code>, <\/code><code>'ignore_sticky_posts'<\/code><code>=&gt; 1 ) );<\/code><code>\/\/ The Loop<\/code><code>if<\/code><code>( <\/code><code>$the_query<\/code><code>-&gt;have_posts() ) {<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>$return<\/code><code>.= <\/code><code>'&lt;ul&gt;'<\/code><code>;<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>while<\/code><code>( <\/code><code>$the_query<\/code><code>-&gt;have_posts() ) {<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>$the_query<\/code><code>-&gt;the_post();<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>$return<\/code><code>.= <\/code><code>'&lt;li&gt;&lt;a href=\"'<\/code><code>.get_permalink(). <\/code><code>'\" title=\"'<\/code><code>. get_the_title() . <\/code><code>'\"&gt;'<\/code><code>. get_the_title() . <\/code><code>'&lt;\/a&gt;&lt;br \/&gt;'<\/code><code>. get_the_excerpt(). <\/code><code>'&lt;\/li&gt;'<\/code><code>;<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>}<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>$return<\/code><code>.= <\/code><code>'&lt;\/ul&gt;'<\/code><code>;<\/code><code>} <\/code><code>else<\/code><code>{<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>\/\/ no posts found<\/code><code>}<\/code><code>\/* Restore original Post Data *\/<\/code><code>wp_reset_postdata();<\/code><code>return<\/code><code>$return<\/code><code>; <\/code><code>}<\/code><code>add_shortcode(<\/code><code>'latest_stickies'<\/code><code>, <\/code><code>'wpb_latest_sticky'<\/code><code>);<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7531<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/wpcode.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPCode\u4e0e \u2764\ufe0f \u4e3b\u529e<\/a><\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/library.wpcode.com\/use-snippet\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u5728 WordPress \u4e2d\u4e00\u952e\u4f7f\u7528<\/a><\/p>\n\n\n\n<p>\u6dfb\u52a0\u6b64\u4ee3\u7801\u540e\uff0c\u53ea\u9700\u5728\u8981\u663e\u793a\u6700\u65b0\u7f6e\u9876\u5e16\u5b50\u7684\u4efb\u4f55\u4f4d\u7f6e<a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-add-a-shortcode-in-wordpress\/\">\u6dfb\u52a0\u77ed\u4ee3\u7801\u5373\u53ef\u3002<\/a>&nbsp;<code>[latest_stickies]<\/code>\u6709\u5173\u8be6\u7ec6\u8bf4\u660e\uff0c\u8bf7\u8bbf\u95ee\u6211\u4eec\u6709\u5173<a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-display-the-latest-sticky-posts-in-wordpress\/\">\u5982\u4f55\u5728 WordPress \u4e2d\u663e\u793a\u6700\u65b0\u7f6e\u9876\u5e16\u5b50\u7684<\/a>\u6587\u7ae0\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"sticky-post-for-custom-post\">4. \u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\u7684\u7f6e\u9876\u5e16\u5b50<\/h4>\n\n\n\n<p>\u60a8\u662f\u5426\u77e5\u9053\u53ef\u4ee5\u5728 WordPress \u4e2d\u8bbe\u7f6e\u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\u7c98\u6027\uff1f<\/p>\n\n\n\n<p>\u901a\u5e38\uff0c\u7f6e\u9876\u5e16\u5b50\u529f\u80fd\u4ec5\u9002\u7528\u4e8e\u9ed8\u8ba4\u7684 WordPress \u5e16\u5b50\uff0c\u4f46\u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u60a8\u4e0d\u80fd\u4e3a\u5176\u4ed6<a href=\"https:\/\/www.wpbeginner.com\/glossary\/post-types\/\">\u5e16\u5b50\u7c7b\u578b<\/a>\u6dfb\u52a0\u6b64\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528<a href=\"https:\/\/wordpress.org\/plugins\/sticky-posts-switch\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u7c98\u6027\u5e16\u5b50 &#8211; Switch<\/a>\u63d2\u4ef6\uff0c\u60a8\u53ef\u4ee5\u5c06\u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\u7c98\u8d34\u5230\u60a8\u7684\u7f51\u7ad9\u3002\u9996\u5148\uff0c\u60a8\u53ef\u4ee5\u5b89\u88c5\u5e76\u6fc0\u6d3b\u8be5\u63d2\u4ef6\u3002\u5982\u679c\u60a8\u9700\u8981\u5e2e\u52a9\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u6709\u5173<a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners\/\">\u5982\u4f55\u5b89\u88c5 WordPress \u63d2\u4ef6\u7684<\/a>\u6307\u5357\u3002<\/p>\n\n\n\n<p>\u6fc0\u6d3b\u540e\uff0c\u53ea\u9700\u4ece WordPress \u4eea\u8868\u677f\u8f6c\u5230<strong>\u8bbe\u7f6e \u00bb \u7f6e\u9876\u5e16\u5b50 \u2013 \u5207\u6362\u5373\u53ef\u3002<\/strong>\u5728\u201c\u5e16\u5b50\u7c7b\u578b\u201d\u5217\u4e0b\uff0c\u60a8\u5c06\u770b\u5230\u60a8\u5728\u7f51\u7ad9\u4e0a\u521b\u5efa\u7684\u6240\u6709<a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-add-custom-post-types-to-your-main-wordpress-rss-feed\/\">\u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b<\/a>\u7684\u5217\u8868\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765\uff0c\u60a8\u53ef\u4ee5\u5355\u51fb\u8981\u7c98\u8d34\u7684\u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\u7684\u590d\u9009\u6846\u3002\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u201c\u56fe\u4e66\u8bc4\u8bba\u201d\u5e16\u5b50\u7c7b\u578b\u6807\u8bb0\u4e3a\u7c98\u6027\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2021\/11\/stickypostsettings.png\" alt=\"\u8bbf\u95ee\u8bbe\u7f6e \u00bb \u7f6e\u9876\u5e16\u5b50 - \u5207\u6362\u9875\u9762\u4ee5\u914d\u7f6e\u63d2\u4ef6\" class=\"wp-image-105687\" title=\"\u8bbf\u95ee\u8bbe\u7f6e \u00bb \u7f6e\u9876\u5e16\u5b50 - \u5207\u6362\u9875\u9762\u4ee5\u914d\u7f6e\u63d2\u4ef6\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-add-sticky-posts-in-custom-post-type-archives\/\">\u6709\u5173\u66f4\u8be6\u7ec6\u7684\u8bf4\u660e\uff0c\u8bf7\u67e5\u770b\u6709\u5173\u5982\u4f55\u5728 WordPress \u81ea\u5b9a\u4e49\u5e16\u5b50\u7c7b\u578b\u4e2d\u6dfb\u52a0\u7f6e\u9876\u5e16\u5b50\u7684<\/a>\u6559\u7a0b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"hide-sticky-post-from-loop\">5. \u5982\u4f55\u9690\u85cf WordPress \u5faa\u73af\u4e2d\u7684\u7c98\u6027\u5e16\u5b50<\/h4>\n\n\n\n<p>\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u65f6\uff0c\u60a8\u4f1a\u6ce8\u610f\u5230 WordPress \u9ed8\u8ba4\u5c06\u60a8\u7684\u6587\u7ae0\u663e\u793a\u5728\u6240\u6709 WordPress \u5e16\u5b50\u7684\u9876\u90e8\u3002<\/p>\n\n\n\n<p>\u8981\u4ece WordPress \u5faa\u73af\u4e2d\u6392\u9664\u7f6e\u9876\u5e16\u5b50\u5e76\u663e\u793a\u5728\u9876\u90e8\uff0c\u60a8\u53ea\u9700<a href=\"https:\/\/www.wpbeginner.com\/plugins\/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site\/\">\u5728 WordPress \u7f51\u7ad9\u4e0a\u8f93\u5165\u4ee5\u4e0b\u81ea\u5b9a\u4e49\u4ee3\u7801<\/a>\u5373\u53ef\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>12345678910111213141516<\/td><td><code>&lt;?php<\/code><code>&nbsp;<\/code><code>\/\/ The loop arguments<\/code><code>$args<\/code><code>= <\/code><code>array<\/code><code>(<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>'posts_per_page'<\/code><code>=&gt; 10,<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>'post__not_in'<\/code><code>=&gt; get_option( <\/code><code>'sticky_posts'<\/code><code>) <\/code><code>\/\/ do not display the sticky posts at all.<\/code><code>);<\/code><code>&nbsp;<\/code><code>\/\/ The loop<\/code><code>$the_query<\/code><code>= <\/code><code>new<\/code><code>WP_Query(<\/code><code>$args<\/code><code>);<\/code><code>if<\/code><code>(<\/code><code>$the_query<\/code><code>-&gt;have_posts()) {<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>while<\/code><code>(<\/code><code>$the_query<\/code><code>-&gt;have_posts()) {<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>$the_query<\/code><code>-&gt;the_post();<\/code><code>&nbsp;<\/code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code>}<\/code><code>}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7531<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/wpcode.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPCode\u4e0e \u2764\ufe0f \u4e3b\u529e<\/a><\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/library.wpcode.com\/use-snippet\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u5728 WordPress \u4e2d\u4e00\u952e\u4f7f\u7528<\/a><\/p>\n\n\n\n<p>\u6b64\u4ee3\u7801\u5c06\u4ece\u5faa\u73af\u4e2d\u5b8c\u5168\u6392\u9664\u7f6e\u9876\u5e16\u5b50\u3002\u8bf7\u53c2\u9605\u6211\u4eec\u5173\u4e8e<a href=\"https:\/\/www.wpbeginner.com\/wp-themes\/how-to-exclude-sticky-posts-from-the-loop-in-wordpress\/\">\u5982\u4f55\u4ece WordPress \u5faa\u73af\u4e2d\u6392\u9664\u7f6e\u9876\u5e16\u5b50\u7684<\/a>\u6559\u7a0b\uff0c\u4ee5\u83b7\u53d6\u66f4\u8be6\u7ec6\u7684\u8bf4\u660e\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"styling-sticky-post\">6. \u5728 WordPress \u4e2d\u8bbe\u7f6e\u7c98\u6027\u5e16\u5b50\u7684\u6837\u5f0f<\/h4>\n\n\n\n<p>\u63a5\u4e0b\u6765\uff0c\u60a8\u60f3\u4e3a\u60a8\u7684\u7f6e\u9876\u5e16\u5b50\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\u5417\uff1f<\/p>\n\n\n\n<p>\u8bb8\u591a WordPress \u4e3b\u9898\u4f7f\u7528<code>post_class()<\/code>\u51fd\u6570\u6765\u81ea\u52a8\u4e3a\u6bcf\u4e2a\u5e16\u5b50\u6dfb\u52a0\u5e16\u5b50\u7c7b\u522b\u3002\u5982\u679c\u60a8\u7684\u4e3b\u9898\u5df2\u7ecf\u5728\u4f7f\u7528<code>post_class()<\/code>\u529f\u80fd\uff0c\u90a3\u4e48\u60a8\u5c06\u770b\u5230\u4e00\u4e2a\u201c\u7c98\u6027\u7c7b\u201d\u6dfb\u52a0\u5230\u60a8\u7684\u7c98\u6027\u5e16\u5b50\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/sticky-post-class-1.png\" alt=\"\u7f6e\u9876\u5e16\u7c7b\" class=\"wp-image-137598\" title=\"Sticky \u7c7b\u6dfb\u52a0\u5230\u5e16\u5b50\u5bb9\u5668\u4e2d\"\/><\/figure>\n\n\n\n<p><code>.sticky<\/code>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u5728<a href=\"https:\/\/www.wpbeginner.com\/showcase\/best-wordpress-themes\/\">WordPress \u4e3b\u9898<\/a>\u4e2d\u4f7f\u7528CSS \u7c7b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5165\u95e8\u7684\u57fa\u672c CSS\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>123456789101112131415161718<\/td><td><code>.sticky { <\/code><code>background-color<\/code><code>:<\/code><code>#ededed<\/code><code>;<\/code><code>border<\/code><code>:<\/code><code>1<\/code><code>px <\/code><code>solid<\/code><code>#f5f5f5<\/code><code>;<\/code><code>color<\/code><code>:<\/code><code>#272727<\/code><code>;<\/code><code>padding<\/code><code>:<\/code><code>5px<\/code><code>;<\/code><code>}<\/code><code>&nbsp;<\/code><code>.sticky:before {<\/code><code>&nbsp;&nbsp;<\/code><code>content<\/code><code>: <\/code><code>\"Featured\"<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>color<\/code><code>: <\/code><code>#FFF<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>background<\/code><code>: <\/code><code>#f20000<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>padding<\/code><code>: <\/code><code>10px<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>display<\/code><code>: <\/code><code>inline-block<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>text-align<\/code><code>: <\/code><code>right<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>float<\/code><code>: <\/code><code>right<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>font-weight<\/code><code>: <\/code><code>bold<\/code><code>;<\/code><code>&nbsp;&nbsp;<\/code><code>text-transform<\/code><code>: <\/code><code>uppercase<\/code><code>;<\/code><code>}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7531<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/wpcode.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPCode\u4e0e \u2764\ufe0f \u4e3b\u529e<\/a><\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/library.wpcode.com\/use-snippet\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u5728 WordPress \u4e2d\u4e00\u952e\u4f7f\u7528<\/a><\/p>\n\n\n\n<p>\u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u6709\u5173<a href=\"https:\/\/www.wpbeginner.com\/plugins\/how-to-easily-add-custom-css-to-your-wordpress-site\/\">\u5982\u4f55\u5728 WordPress \u4e2d\u6dfb\u52a0\u81ea\u5b9a\u4e49 CSS \u7684<\/a>\u6307\u5357\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u52a9\u60a8\u4e86\u89e3\u5982\u4f55\u5728 WordPress \u7f51\u7ad9\u4e0a\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u8fdb\u884c\u4e00\u4e9b\u5f88\u9177\u7684\u4e8b\u60c5\u3002\u60a8\u53ef\u80fd\u8fd8\u60f3\u67e5\u770b\u6211\u4eec\u5173\u4e8e<a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-start-an-online-store\/\">\u5982\u4f55\u5f00\u8bbe\u5728\u7ebf\u5546\u5e97\u7684<\/a>\u6307\u5357\u4ee5\u53ca<a href=\"https:\/\/www.wpbeginner.com\/wordpress-seo\/\">\u9488\u5bf9\u521d\u5b66\u8005\u7684\u7ec8\u6781 WordPress SEO \u6307\u5357\u3002<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60a8\u662f\u5426\u60f3\u77e5\u9053\u53ef\u4ee5\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u505a\u4ec0\u4e48\uff1f \u7c98\u6027\u5e16\u5b50\u662f WordPress \u4e2d\u6700\u4e0d\u4e3a\u4eba\u6240\u77e5 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\"> <span class=\"screen-reader-text\">\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":1721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[25],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 - WordPress\u4e2d\u6587<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 - WordPress\u4e2d\u6587\" \/>\n<meta property=\"og:description\" content=\"\u60a8\u662f\u5426\u60f3\u77e5\u9053\u53ef\u4ee5\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u505a\u4ec0\u4e48\uff1f \u7c98\u6027\u5e16\u5b50\u662f WordPress \u4e2d\u6700\u4e0d\u4e3a\u4eba\u6240\u77e5 &hellip; \u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 Read More \u00bb\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\" \/>\n<meta property=\"og:site_name\" content=\"WordPress\u4e2d\u6587\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-09T13:23:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-09T13:24:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png\" \/>\n<meta name=\"author\" content=\"qmk\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"qmk\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719#article\",\"isPartOf\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\"},\"author\":{\"name\":\"qmk\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#\/schema\/person\/80e9903d893da74eb372a4c631f6e22c\"},\"headline\":\"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5\",\"datePublished\":\"2023-10-09T13:23:51+00:00\",\"dateModified\":\"2023-10-09T13:24:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\"},\"wordCount\":57,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#organization\"},\"articleSection\":[\"\u521d\u5b66\u6307\u5357\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/wpeyes.com\/wordpress\/archives\/1719#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\",\"url\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\",\"name\":\"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 - WordPress\u4e2d\u6587\",\"isPartOf\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#website\"},\"datePublished\":\"2023-10-09T13:23:51+00:00\",\"dateModified\":\"2023-10-09T13:24:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpeyes.com\/wordpress\/archives\/1719\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/archives\/1719#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/wpeyes.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u535a\u6587\",\"item\":\"https:\/\/wpeyes.com\/wordpress\/archives\/category\/web-article\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"wpbeginner\",\"item\":\"https:\/\/wpeyes.com\/wordpress\/archives\/category\/web-article\/wpbeginner\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u521d\u5b66\u6307\u5357\",\"item\":\"https:\/\/wpeyes.com\/wordpress\/archives\/category\/web-article\/wpbeginner\/beginners-guide\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#website\",\"url\":\"https:\/\/wpeyes.com\/wordpress\/\",\"name\":\"WordPress\u4e2d\u6587\",\"description\":\"wpeyes\u6280\u672f\u89c6\u70b9\",\"publisher\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpeyes.com\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#organization\",\"name\":\"WordPress\u4e2d\u6587\",\"url\":\"https:\/\/wpeyes.com\/wordpress\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/wpeyes.com\/wordpress\/wp-content\/uploads\/sites\/8\/2024\/01\/WordPress-logotype-wmark-white.png\",\"contentUrl\":\"https:\/\/wpeyes.com\/wordpress\/wp-content\/uploads\/sites\/8\/2024\/01\/WordPress-logotype-wmark-white.png\",\"width\":1000,\"height\":1000,\"caption\":\"WordPress\u4e2d\u6587\"},\"image\":{\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#\/schema\/person\/80e9903d893da74eb372a4c631f6e22c\",\"name\":\"qmk\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/wpeyes.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b6009682ec6e3b4264f67fa0e1da275c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b6009682ec6e3b4264f67fa0e1da275c?s=96&d=mm&r=g\",\"caption\":\"qmk\"},\"sameAs\":[\"https:\/\/wpeyes.com\"],\"url\":\"https:\/\/wpeyes.com\/wordpress\/archives\/author\/qmk\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 - WordPress\u4e2d\u6587","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wpeyes.com\/wordpress\/archives\/1719","og_locale":"zh_CN","og_type":"article","og_title":"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 - WordPress\u4e2d\u6587","og_description":"\u60a8\u662f\u5426\u60f3\u77e5\u9053\u53ef\u4ee5\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u505a\u4ec0\u4e48\uff1f \u7c98\u6027\u5e16\u5b50\u662f WordPress \u4e2d\u6700\u4e0d\u4e3a\u4eba\u6240\u77e5 &hellip; \u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 Read More \u00bb","og_url":"https:\/\/wpeyes.com\/wordpress\/archives\/1719","og_site_name":"WordPress\u4e2d\u6587","article_published_time":"2023-10-09T13:23:51+00:00","article_modified_time":"2023-10-09T13:24:06+00:00","og_image":[{"url":"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png"}],"author":"qmk","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png","twitter_misc":{"\u4f5c\u8005":"qmk","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wpeyes.com\/wordpress\/archives\/1719#article","isPartOf":{"@id":"https:\/\/wpeyes.com\/wordpress\/archives\/1719"},"author":{"name":"qmk","@id":"https:\/\/wpeyes.com\/wordpress\/#\/schema\/person\/80e9903d893da74eb372a4c631f6e22c"},"headline":"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5","datePublished":"2023-10-09T13:23:51+00:00","dateModified":"2023-10-09T13:24:06+00:00","mainEntityOfPage":{"@id":"https:\/\/wpeyes.com\/wordpress\/archives\/1719"},"wordCount":57,"commentCount":0,"publisher":{"@id":"https:\/\/wpeyes.com\/wordpress\/#organization"},"articleSection":["\u521d\u5b66\u6307\u5357"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wpeyes.com\/wordpress\/archives\/1719#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wpeyes.com\/wordpress\/archives\/1719","url":"https:\/\/wpeyes.com\/wordpress\/archives\/1719","name":"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5 - WordPress\u4e2d\u6587","isPartOf":{"@id":"https:\/\/wpeyes.com\/wordpress\/#website"},"datePublished":"2023-10-09T13:23:51+00:00","dateModified":"2023-10-09T13:24:06+00:00","breadcrumb":{"@id":"https:\/\/wpeyes.com\/wordpress\/archives\/1719#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpeyes.com\/wordpress\/archives\/1719"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpeyes.com\/wordpress\/archives\/1719#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/wpeyes.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"\u535a\u6587","item":"https:\/\/wpeyes.com\/wordpress\/archives\/category\/web-article"},{"@type":"ListItem","position":3,"name":"wpbeginner","item":"https:\/\/wpeyes.com\/wordpress\/archives\/category\/web-article\/wpbeginner"},{"@type":"ListItem","position":4,"name":"\u521d\u5b66\u6307\u5357","item":"https:\/\/wpeyes.com\/wordpress\/archives\/category\/web-article\/wpbeginner\/beginners-guide"},{"@type":"ListItem","position":5,"name":"\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u53ef\u4ee5\u505a\u7684 6 \u4ef6\u5f88\u9177\u7684\u4e8b\u60c5"}]},{"@type":"WebSite","@id":"https:\/\/wpeyes.com\/wordpress\/#website","url":"https:\/\/wpeyes.com\/wordpress\/","name":"WordPress\u4e2d\u6587","description":"wpeyes\u6280\u672f\u89c6\u70b9","publisher":{"@id":"https:\/\/wpeyes.com\/wordpress\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpeyes.com\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"Organization","@id":"https:\/\/wpeyes.com\/wordpress\/#organization","name":"WordPress\u4e2d\u6587","url":"https:\/\/wpeyes.com\/wordpress\/","logo":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/wpeyes.com\/wordpress\/#\/schema\/logo\/image\/","url":"https:\/\/wpeyes.com\/wordpress\/wp-content\/uploads\/sites\/8\/2024\/01\/WordPress-logotype-wmark-white.png","contentUrl":"https:\/\/wpeyes.com\/wordpress\/wp-content\/uploads\/sites\/8\/2024\/01\/WordPress-logotype-wmark-white.png","width":1000,"height":1000,"caption":"WordPress\u4e2d\u6587"},"image":{"@id":"https:\/\/wpeyes.com\/wordpress\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/wpeyes.com\/wordpress\/#\/schema\/person\/80e9903d893da74eb372a4c631f6e22c","name":"qmk","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/wpeyes.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b6009682ec6e3b4264f67fa0e1da275c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b6009682ec6e3b4264f67fa0e1da275c?s=96&d=mm&r=g","caption":"qmk"},"sameAs":["https:\/\/wpeyes.com"],"url":"https:\/\/wpeyes.com\/wordpress\/archives\/author\/qmk"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",250,250,false],"thumbnail":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",150,150,false],"medium":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",250,250,false],"medium_large":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",250,250,false],"large":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",250,250,false],"1536x1536":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",250,250,false],"2048x2048":["https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2015\/03\/cool-things-to-do-with-sticky-posts.png",250,250,false]},"uagb_author_info":{"display_name":"qmk","author_link":"https:\/\/wpeyes.com\/wordpress\/archives\/author\/qmk"},"uagb_comment_info":0,"uagb_excerpt":"\u60a8\u662f\u5426\u60f3\u77e5\u9053\u53ef\u4ee5\u5728 WordPress \u4e2d\u4f7f\u7528\u7f6e\u9876\u5e16\u5b50\u505a\u4ec0\u4e48\uff1f \u7c98\u6027\u5e16\u5b50\u662f WordPress \u4e2d\u6700\u4e0d\u4e3a\u4eba\u6240\u77e5&hellip;","_links":{"self":[{"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/posts\/1719"}],"collection":[{"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1719"}],"version-history":[{"count":1,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/posts\/1719\/revisions"}],"predecessor-version":[{"id":1720,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/posts\/1719\/revisions\/1720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/media\/1721"}],"wp:attachment":[{"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpeyes.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}