{"id":84,"date":"2026-11-06T14:03:07","date_gmt":"2026-11-06T06:03:07","guid":{"rendered":"http:\/\/pro369.com\/blog\/?p=84"},"modified":"2026-11-06T14:03:07","modified_gmt":"2026-11-06T06:03:07","slug":"%e7%af%a9%e9%81%b8wordpress%e4%b8%bb%e9%a1%8c%e6%99%82%e9%9c%80%e8%a6%81%e8%80%83%e6%85%ae%e7%9a%84%e5%8d%81%e5%80%8b%e5%9b%a0%e7%b4%a0","status":"publish","type":"post","link":"https:\/\/por.tw\/blog\/2026\/11\/06\/%e7%af%a9%e9%81%b8wordpress%e4%b8%bb%e9%a1%8c%e6%99%82%e9%9c%80%e8%a6%81%e8%80%83%e6%85%ae%e7%9a%84%e5%8d%81%e5%80%8b%e5%9b%a0%e7%b4%a0\/","title":{"rendered":"\u7be9\u9078WordPress\u4e3b\u984c\u6642\u9700\u8981\u8003\u616e\u7684\u5341\u500b\u56e0\u7d20"},"content":{"rendered":"<p><span style=\"font-size: small\"><strong><br \/><span style=\"color: #ff0000\">\u60a8\u77e5\u9053\u7be9\u9078WordPress\u4e3b\u984c\u6642\u9700\u8981\u8003\u616e\u7684\u5341\u500b\u56e0\u7d20\u55ce\uff1f<\/span><br \/><span style=\"color: #0000ff\">\u4ee5\u4e0b\u662f\uff1a\u7be9\u9078WordPress\u4e3b\u984c\u6642\u9700\u8981\u8003\u616e\u7684\u5341\u500b\u56e0\u7d20\uff08\u63d0\u4f9b\u7d66\u60a8\u7576\u7d66\u53c3\u8003\uff09\uff1a<\/span><br \/>1. \u639b\u9264 (Hooks)<\/p>\n<p>WordPress \u5916\u639b\u7a0b\u5f0f\u9700\u8981\u901a\u904e\u9019\u4e9b\u88ab\u53eb\u505a\u300c\u639b\u9264\u300d\u7684\u6771\u6771\u4f86\u5b8c\u5584\u5916\u639b\u7a0b\u5f0f\u7684\u529f\u80fd\uff0c\u50cf\u52a0\u5165\u6240\u9700\u7684\u6a23\u5f0f\u548c\u8173\u672c\u7b49\u3002<br \/>\u5982\u679c\u6c92\u6709\u9019\u4e9b\u639b\u9264\uff0c\u5f88\u53ef\u80fd\u5916\u639b\u7a0b\u5f0f\u5c31\u7121\u6cd5\u6a19\u6e96\u7684\u5de5\u4f5c\u3002\u5982\u4f55\u4f86\u6aa2\u9a57\u4e3b\u984c\u4e2d\u662f\u5426\u6709\u639b\u9264\u5462\uff0c\u5f80\u4e0b\u770b\uff1a<\/p>\n<p>1. header.php \u4e2d\u61c9\u8a72\u6709\u985e\u4f3c wp_head(); \u6216 do_action(&#39;wp_head&#39;); \u9019\u6a23\u7684\u4ee3\u78bc\uff0c\u4e00\u822c\u5728 \u4e4b\u524d\uff1b<br \/>2. footer.php \u4e2d\u61c9\u8a72\u6709\u985e\u4f3c wp_footer(); \u6216 do_action(&#39;wp_footer&#39;); \u9019\u6a23\u7684\u4ee3\u78bc\uff0c\u4e00\u822c\u5728 \u4e4b\u524d\uff1b<br \/>3. comments.php \u548c\/\u6216 comments-popup.php \u4e2d\u61c9\u8a72\u6709\u985e\u4f3c do_action(&#39;comment_form&#39;, $post-&gt;ID); \u9019\u6a23\u7684\u4ee3\u78bc\uff0c\u4e00\u822c\u5728 \u4e4b\u524d\u3002<\/p>\n<p>2. \u6a21\u677f\u6a94\u6848<\/p>\n<p>\u4e00\u822c\u7684\u4e3b\u984c\u61c9\u8a72\u5305\u62ec\u4ee5\u4e0b\u7684\u6a21\u677f\u6a94\u6848\uff1a<\/p>\n<p>* home.php\uff1a\u9996\u9801\u6240\u9700\u7684\u6a21\u677f\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* single.php\uff1a\u7368\u7acb\u6587\u7ae0\u6240\u9700\u7684\u6a21\u677f\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* page.php\uff1a\u9801\u9762\u6240\u9700\u7684\u6a21\u677f\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* category.php\uff1a\u5206\u985e\u7d22\u5f15\u6240\u9700\u7684\u6a21\u677f\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* author.php\uff1a\u4f5c\u8005\u6a21\u677f\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* date.php\uff1a\u8cc7\u6599\u7d22\u5f15\u6240\u9700\u6a21\u677f\uff0c\u7528\u4f86\u5c55\u793a\u6587\u7ae0\u6b78\u6a94\u7b49\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* archive.php\uff1a\u7576 category.php\u3001author.php\u3001date.php \u4e0d\u5b58\u5728\u6642\u7528\u4f86\u5c55\u793a\u6587\u7ae0\u6b78\u6a94\u7b49\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* search.php\uff1a\u5c55\u793a\u641c\u5c0b\u7d50\u679c\u6240\u9700\u7684\u6a21\u677f\u3002\uff08\u8b6f\u8005\u8a3b\uff1a\u975e\u5fc5\u9808\uff0c\u53ef\u7528 index.php \u4ee3\u66ff\u3002\uff09<br \/>* 404.php\uff1a\u51fa\u73fe 404 \u932f\u8aa4\u6642\u6240\u9700\u7684\u6a21\u677f\u3002<\/p>\n<p>3. \u662f\u5426\u652f\u63f4 Widget<\/p>\n<p>WordPress \u7684 Widget \u53ef\u4ee5\u65b9\u4fbf\u7684\u5728\u4e0d\u4fee\u6539\u4e3b\u984c\u6a94\u6848\u7684\u524d\u63d0\u4e0b\uff0c\u5728\u5f8c\u53f0\u52d5\u614b\u7684\u8a2d\u5b9a\u5728\u5074\u908a\u6b04\u7b49\u8655\u986f\u793a\u4e00\u4e9b\u4e00\u822c\u548c\u4e0d\u4e00\u822c\u7684\u5167\u5bb9\u3002\u5c31\u76ee\u524d\u7684\u60c5\u6cc1\u4f86\u770b\uff0c\u4e3b\u984c\u61c9\u8a72\u652f\u63f4 Widget\uff0c\u4f46\u6211\u5efa\u8b70\u4e0d\u8981\u652f\u63f4\u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u5728 sidebar.php \u4e2d\u5c0b\u627e\u662f\u5426\u6709\u985e\u4f3c dynamic_sidebar(&#39;&#39;) \u9019\u6a23\u7684\u4ee3\u78bc\uff0c\u4f86\u6aa2\u67e5\u4e3b\u984c\u662f\u5426\u652f\u63f4 Widget\u3002<br \/><\/strong><\/span><br \/><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/por.tw\/blog\/wp-content\/uploads\/2013\/04\/2036671879.jpg\"  width=\"430\" height=\"334\" \/><span style=\"font-size: small\"><strong><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\u3010\u6587\u7ae0\u6a19\u984c\u3011: \u7be9\u9078WordPress\u4e3b\u984c\u6642\u9700\u8981\u8003\u616e\u7684\u5341\u500b\u56e0\u7d20<br \/>\u3010\u6587\u7ae0\u4f5c\u8005\u3011: \u90e8\u843d\u683c\u67b6\u7ad9\u3001\u884c\u92b7\u3001\u8cfa\u9322\u8853\u6559\u5b78\u5bc6\u8a13\u57fa\u5730<br \/>\u3010\u4f5c\u8005\u4fe1\u7bb1\u3011: ster168ster@gmail.com<br \/>\u3010\u4f5c\u8005\u9996\u9801\u3011: http:\/\/por.tw\/blog\/<br \/>\u3010\u90e8\u843d\u683c\u67b6\u7ad9\u3001\u884c\u92b7\u3001\u8cfa\u9322\u8853\u6559\u5b78\u8ab2\u7a0b\u3011: http:\/\/por.tw\/blog\/E_learning\/index.php<br \/>\u3010\u57fa\u5730\u4e3b\u6a5f\u3011: http:\/\/goto1688.com\/blog\/<br \/>\u3010\u7248\u6b0a\u8072\u660e\u3011: \uff08\u539f\u5275\uff09\u90e8\u843d\u683c\u67b6\u7ad9\u3001\u884c\u92b7\u3001\u8cfa\u9322\u8853\u6559\u5b78\u5bc6\u8a13\u57fa\u5730\uff0c\u8f49\u8f09\u5fc5\u9808\u4fdd\u7559\u5b8c\u6574\u6a19\u982d\u3002\u522a\u9664\u8005\u4f9d\u6cd5\u8ffd\u7a76\uff01<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>4. \u662f\u5426\u6709\u641c\u5c0b\u529f\u80fd<br \/>\u5f88\u96e3\u76f8\u4fe1\u67d0\u4e9b\u4e3b\u984c\u4e26\u4e0d\u5305\u62ec\u641c\u5c0b\u6846\u3002\u78ba\u4fdd\u4f60\u6240\u9078\u7684\u4e3b\u984c\u6709\u9019\u4e00\u529f\u80fd\u3002<\/p>\n<p>5. \u700f\u89bd\u5668\u7684\u76f8\u5bb9\u6027<\/p>\n<p>\u901a\u5e38\u4e3b\u984c\u90fd\u6703\u6709\u9810\u89bd\u4f4d\u5740\uff0c\u4f60\u61c9\u8a72\u5c07\u9019\u4e00 URL \u8907\u88fd\u5230 browsershots \u4f86\u6aa2\u8996\u9019\u4e00\u4e3b\u984c\u662f\u5426\u5728\u4e3b\u6d41\u7684\u700f\u89bd\u5668\u4e2d\u8868\u73fe\u826f\u597d\u3002\u5982\u679c\u5728\u975e\u4e3b\u6d41\u700f\u89bd\u5668\u4e2d\u7684\u8868\u73fe\u6b20\u4f73\uff0c\u4e0d\u8981\u5728\u610f\uff0c\u4f46\u5982\u679c\u4e0d\u80fd\u5728 IE6\uff08\u8b6f\u8005\u8a3b\uff1aIE6\uff1f\u958b\u73a9\u7b11\uff0c\u5fc5\u9808\u88ab\u5ee2\u9664\u7684\uff0c\u5805\u6c7a\u4e0d\u652f\u63f4\u3002\uff09\u3001IE7\u3001Firefox\u3001Safari \u7684\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7d71\u7248\u672c\u4e2d\u8868\u73fe\u826f\u597d\uff0c\u90a3\u5c31\u8aaa\u4e0d\u904e\u53bb\u4e86\u3002<\/p>\n<p>6. \u4ee3\u78bc\u662f\u5426\u80fd\u901a\u904e\u9a57\u8b49<\/p>\n<p>\u5f88\u591a\u4e3b\u984c\u4f5c\u8005\u662f designer \u800c\u4e0d\u662f coder\uff0c\u6b64\u6642\u96e3\u514d\u4ed6\u5011\u4e0d\u6703\u70ba\u4e86\u9054\u5230\u6240\u9700\u6548\u679c\u800c\u505a\u9069\u7576\u7684 hack\uff0c\u800c\u4e0d\u6703\u8003\u616e\u662f\u5426\u80fd\u901a\u904e\u9a57\u8b49\u3002\u5982\u679c\u4e0d\u80fd\u901a\u904e\u9a57\u8b49\uff0c\u5f88\u96e3\u4fdd\u8b49\u5728\u672a\u4f86\u7684\u700f\u89bd\u5668\u4e2d\u80fd\u5920\u5f88\u597d\u7684\u89e3\u6790\u3002\u4f60\u53ef\u4ee5\u901a\u904e W3C\u300fs validator \u4f86\u6aa2\u9a57\u3002Lorelle \u5beb\u4e86\u4e00\u7bc7\u8a0e\u8ad6\u9075\u5b88\u6a19\u6e96\u597d\u8655\u7684\u6587\u7ae0\u3002<\/p>\n<p>7. \u6aa2\u67e5\u5916\u93c8<\/p>\n<p>\u5f88\u591a\u4e3b\u984c\u90fd\u6703\u5728 footer \u4e2d\u52a0\u5165\u9023\u7d50\uff0c\u9019\u4e9b\u9023\u7d50\u5f80\u5f80\u662f\u4e00\u4e9b\u8d0a\u52a9\u5546\u7684\uff0c\u6b64\u6642\u5c31\u8981\u6ce8\u610f\u4e86\uff0c\u9019\u4e9b\u9023\u7d50\u5c0d SEO \u6703\u7522\u751f\u5f71\u97ff\u3002\u6211\u5011\u53ef\u4ee5\u4f7f\u7528 Dave Naylor\u300fs Keyword Density tool \u4f86\u6aa2\u67e5\u9019\u4e9b\u9023\u7d50\uff0c\u5b83\u6703\u767c\u73fe\u5169\u7a2e\u9023\u7d50\u5f62\u5f0f\uff0cfoolow \u548c nofollow\u3002nofollow \u7684\u9023\u7d50\u4e0d\u6703\u88ab\u641c\u5c0b\u5f15\u64ce\u7d22\u5f15\uff0c\u6240\u4ee5\u5c0d\u4f60\u7684\u7ad9\u53f0\u4e0d\u6703\u7522\u751f\u526f\u4f5c\u7528\u3002<\/p>\n<p>\u800c follow \u7684\u9023\u7d50\u6703\u88ab\u641c\u5c0b\u5f15\u64ce\u7d22\u5f15\uff0c\u6240\u4ee5\u5fc5\u9808\u5c0f\u5fc3\u9019\u4e9b\u5916\u93c8\u6240\u9023\u7d50\u7684\u7ad9\u53f0\uff0c\u50cf\u662f spam \u7684\u7ad9\u53f0\u4e00\u5b9a\u6703\u4f7f\u4f60\u7684\u7ad9\u53f0\u53d7\u5230\u61f2\u7f70\u3002<\/p>\n<p>\u5982\u679c\u4f60\u6240\u9078\u53d6\u4e3b\u984c\u5305\u62ec\u9019\u6a23\u60e1\u610f\u7684\u9023\u7d50\uff0c\u6216\u662f\u5f88\u5546\u696d\u5316\u7684\uff0c\u770b\u770b\u4f60\u80fd\u5426\u53bb\u9664\u9019\u4e9b\u9023\u7d50\uff0c\u5982\u679c\u4e0d\u80fd\uff0c\u76e1\u5feb\u7684\u91cd\u65b0\u9078\u53d6\u4e3b\u984c\u5427\u3002<\/p>\n<p>8. \u80fd\u5426\u8655\u7406\u300c\u9801\u9762\u300d<\/p>\n<p>\u5982\u679c\u4f60\u7684\u7ad9\u53f0\u5305\u62ec\u300c\u9801\u9762\u300d\uff0c\u90a3\u9ebc\u8981\u78ba\u8a8d\u4f60\u6240\u9078\u53d6\u7684\u4e3b\u984c\u80fd\u5426\u8655\u7406\u9801\u9762\uff0c\u81ea\u52d5\u7684\u52a0\u5165\u9801\u9762\u7684\u9023\u7d50\uff0c\u4ee5\u53ca\u8655\u7406\u9801\u9762\u5c64\u6b21\u7d50\u69cb\u7684\u80fd\u529b\u3002<\/p>\n<p>9. \u78ba\u4fdd\u4e3b\u984c\u652f\u63f4 Trackback<\/p>\n<p>\u5982\u679c\u8a2d\u5b9a\u5bb9\u8a31\uff0c\u7576\u5176\u4ed6\u4eba\u7684\u7ad9\u53f0\u4e2d\u5305\u62ec\u4f60\u7684\u9023\u7d50\u6642\uff0c\u6703\u81ea\u52d5\u767c\u4e00\u500b Trackback \u7d66\u4f60\u3002\u70ba\u4e86\u80fd\u5920\u5be6\u73fe\u9019\u4e00\u529f\u80fd\uff0c\u5fc5\u9808\u5728\u4f60\u7684\u4e3b\u984c\u4e2d\u5217\u51fa Trackback \u8cc7\u8a0a\u3002\u9019\u4e00\u8cc7\u8a0a\u4e0d\u4e00\u5b9a\u8981\u53ef\u898b\uff0c\u4f60\u53ef\u4ee5\u6aa2\u67e5 single.php \u548c page.php \u7684 endwhile; \u4e4b\u524d\u662f\u5426\u6709\u985e\u4f3c trackback_rdf(); \u3002<\/p>\n<p>10. \u5982\u4f55\u8655\u7406 title<\/p>\n<p>\u4f60\u61c9\u8a72\u6aa2\u67e5\u4e3b\u984c\u662f\u600e\u6a23\u8655\u7406\u9801\u9762\u6a19\u984c\u7684\uff0c\u9019\u4e00\u8cc7\u8a0a\u53ef\u4ee5\u5728title\u6a19\u7c64\u4e2d\u627e\u5230\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 Headspace2 \u9019\u6a23\u7684\u5916\u639b\u7a0b\u5f0f\u4f86\u66f4\u597d\u7684\u8a2d\u5b9a\u3002<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/><span style=\"font-size: x-small; color: #3366ff\">\u4f60\u5728\u6478\u7d22\u5982\u4f55\u67b6\u7ad9\u90e8\u843d\u683c\uff1f\u5982\u4f55\u5c55\u958b\u884c\u92b7\u90e8\u843d\u683c\u3001\u751a\u81f3\u8cfa\u9322\u55ce\uff1f\u6709\u3010\u6280\u8853\u9867\u554f\u670d\u52d9\u3011\u53ef\u8aee\u8a62\u55ce\uff1f<br \/>\u7576\u554f\u984c\u7121\u6cd5\u89e3\u6c7a\u4f60\u8981\u767c\u5f88\u591a\u6642\u9593\u8655\u7406\uff08\u6216\u8a31\u6c38\u9060\u627e\u51fa\u7b54\u6848\uff09\u662f\u7368\u81ea\u6478\u7d22\u90e8\u843d\u683c\u67b6\u7ad9\u3001\u884c\u92b7\u3001\u8cfa\u9322\u75db\u82e6\u7684\u958b\u59cb\uff01<br \/>\u8cfc\u8cb7\u3010\u90e8\u843d\u683c\u67b6\u7ad9\u3001\u884c\u92b7\u3001\u8cfa\u9322\u8853\u3011DVD\u8ab2\u7a0b\uff0c\u5c31\u53ef\u7372\u5f97\u3010\u90e8\u843d\u683c\u67b6\u7ad9\u884c\u92b7\u8cfa\u9322\u3011\u6280\u8853\u3010\u9867\u554f\u8aee\u8a62\u670d\u52d9\u3011\uff01<\/span><\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"post-excerpt\"><p>\u60a8\u77e5\u9053\u7be9\u9078WordPress\u4e3b\u984c\u6642\u9700\u8981\u8003\u616e\u7684\u5341\u500b\u56e0\u7d20\u55ce\uff1f\u4ee5\u4e0b\u662f\uff1a\u7be9\u9078WordPress\u4e3b\u984c\u6642\u9700\u8981\u8003\u616e\u7684\u5341\u500b\u56e0\u7d20<\/p>\n<\/div>","protected":false},"author":1,"featured_media":500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[34],"class_list":["post-84","post","type-post","status-publish","format-standard","has-post-thumbnail","category-wordpress-","tag-wordpress-"],"_links":{"self":[{"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"wp:attachment":[{"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/blog\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}