{"id":77,"date":"2013-05-28T18:31:16","date_gmt":"2013-05-28T10:31:16","guid":{"rendered":"http:\/\/lttt.blog.ustc.edu.cn\/?p=77"},"modified":"2013-05-28T18:31:16","modified_gmt":"2013-05-28T10:31:16","slug":"%e6%b5%85%e8%b0%88wp%e4%b8%bb%e9%a2%98%e5%88%b6%e4%bd%9c-%e5%bf%ab%e9%80%9f%e5%88%9b%e5%bb%baseo%e8%bf%87%e7%9a%84%e4%b8%bb%e9%a2%98","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=77","title":{"rendered":"\u6d45\u8c08WP\u4e3b\u9898\u5236\u4f5c&#8212;\u5feb\u901f\u521b\u5efaSEO\u8fc7\u7684\u4e3b\u9898"},"content":{"rendered":"<h3>\u9898\u8bb0<\/h3>\n<p>\u4f7f\u7528WP\u4e5f\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86, \u4e00\u5f00\u59cb\u662f\u522b\u4eba\u95ee\u6211\u600e\u4e48\u628aLaTeX\u5199\u7684\u6f02\u4eae\u7684\u516c\u5f0f\u642c\u5230\u7f51\u4e0a? \u6211\u4e5f\u5f88\u597d\u5947, \u7ed3\u679c\u53d1\u73b0MathJaX\u5c31\u662f\u5f88\u597d\u7684\u4e00\u4e2a\u811a\u672c. \u518d\u540e\u6765\u5c1d\u8bd5\u7528Google App \u642d\u5efa\u535a\u5ba2\u5e73\u53f0, \u7531\u4e8e\u5927\u9646\u88ab\u5f3a\u4e86, \u975e\u5e38\u90c1\u95f7. \u518d\u540e\u6765\u53d1\u73b0SAE\u6709\u4e91\u5e73\u53f0, \u5475\u5475\u8fd8\u6709WP\u5174\u594b\u4e4b\u4f59\u5c31\u5f00\u59cb\u4e86\u63a2\u7d22\u4e4b\u65c5.<\/p>\n<h3>\u5f00\u59cb\u4e4b\u65c5<\/h3>\n<p>\u4e00\u5f00\u59cb, \u6211\u4eec\u90fd\u662f\u53cd\u590d\u4fee\u6539\u522b\u4eba\u7684\u6a21\u677f, \u6362\u554a\u6362. \u90fd\u4e0d\u662f\u5f88\u6ee1\u610f: \u901a\u4e0d\u8fc7HTML\u9a8c\u8bc1, CSS\u9a8c\u8bc1, \u4e0b\u62c9\u83dc\u5355\u5f39\u4e0d\u51fa\u6765, \u683c\u5f0f\u4e0d\u597d\u770b, \u6dfb\u52a0\u65b0\u529f\u80fd, \u7b49\u7b49\u6298\u817e&#8230;<\/p>\n<p>\u7a0d\u5fae\u9ad8\u7aef\u7684, \u8fd8\u8981seo. \u81f3\u4eca\u6211\u8fd8\u6ca1\u660e\u767d\u4ee3\u7801\u548cseo\u7684\u5177\u4f53\u5173\u7cfb. \u4e0d\u8fc7, \u563f\u563f. \u6211\u5df2\u7ecf\u786e\u4fe1\u627e\u5230\u4e86\u65b9\u6cd5, \u8fd9\u4e00\u5207\u90fd\u7ec8\u6b62\u4e8e\u6211\u81ea\u5df1\u5199\u4e86\u4e2aWP\u4e3b\u9898.<\/p>\n<h3>\u57fa\u672c\u8981\u6c42<\/h3>\n<ol>\n<li>\u4f1a\u901a\u8fc7chrome\u7684\u5143\u7d20\u5ba1\u67e5\u4fee\u6539css, \u660e\u767d\u5e38\u89c1\u7684css\u5bb9\u5668\u548c\u5c5e\u6027<\/li>\n<li>\u660e\u767d\u7b80\u5355\u7684php\u7f16\u7a0b, \u8bed\u6cd5<\/li>\n<li>\u4e86\u89e3WP \u94a9\u5b50(hook), \u51fd\u6570(function)<\/li>\n<li>\u6700\u540e, \u559c\u6b22\u6298\u817e<\/li>\n<\/ol>\n<p><!--more--><\/p>\n<h3>\u4e3b\u9898\u5236\u4f5c\u6b65\u9aa4\u8be6\u89e3<\/h3>\n<p>\u4e0b\u9762\u6211\u5c31\u5982\u4f55\u5feb\u901f\u521b\u5efa\u4e00\u4e2a\u9002\u5408\u81ea\u5df1\u7684WP\u4e3b\u9898\u6765\u5199\u70b9\u4f53\u4f1a. \u90a3\u4e9b\u6211\u8ba4\u4e3a\u5173\u952e\u7684\u5730\u65b9\u4f1a\u89e3\u91ca, \u800c\u57fa\u672c\u7684\u4e1c\u897f\u8bf7google.<\/p>\n<ol>\n<\/ol>\n<ol>\n<li><strong>\u642d\u5efa\u672c\u5730\u6d4b\u8bd5\u73af\u5883<\/strong><br \/>\n\u5f88\u7b80\u5355, \u5c31\u662f\u4e0b\u8f7dXAMP, \u5efa\u8bae\u4e0b\u8f7dU\u7248, \u65b9\u4fbf\u79fb\u690d. \u5b89\u88c5\u5230U\u76d8\u540e, \u901a\u8fc7xampp_start.exe \u4e0exampp_stop\u6765\u5f00\u59cb\u4e0e\u7ed3\u675f\u672c\u5730apache, php\u4e0emysql\u73af\u5883. \u7136\u540e\u4e0b\u8f7dWP\u5b89\u88c5\u5305\u5e76\u89e3\u538b\u5230xampp\\htdocs\\wordpress\u76ee\u5f55\u4e0b(\u5176\u4e2dwordpress\u662f\u65b0\u5efa\u7684, \u91cc\u9762\u662f\u5404\u79cdwp\u6587\u4ef6). \u6700\u540e\u5c31\u662f\u901a\u8fc7xamp\u5efa\u7acbwp\u7684sql\u6570\u636e\u5e93, \u5e76\u901a\u8fc7http:\/\/localhost\/wordpress\u6765\u5b89\u88c5WP. \u5177\u4f53\u8bbe\u7f6e\u53ef\u4ee5\u53c2\u8003\u6211\u7231\u6c34\u716e\u9c7c\u7684\u300a<a href=\"http:\/\/fairyfish.net\/2007\/06\/25\/installing-wordpress-locally\/\" target=\"_blank\">\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e0a\u5b89\u88c5 WordPress \u672c\u5730\u6d4b\u8bd5<\/a>\u00a0\u300b.<\/li>\n<li><strong>\u5b89\u88c5\u7236(\u6a21\u677f)\u4e3b\u9898<\/strong><br \/>\n\u6700\u5feb\u901f\u7684\u65b9\u6cd5\u5c31\u662f\u57fa\u4e8e\u522b\u4eba\u7684\u6846\u67b6\u6765\u5199\u4e3b\u9898, \u8fd9\u6837\u57fa\u672c\u7684\u6846\u67b6\u90fd\u5df2\u7ecf\u642d\u5efa\u597d\u4e86. \u4f60\u552f\u4e00\u9700\u8981\u7684\u5c31\u662f\u4f5c\u9002\u5f53\u7684\u4fee\u6539, \u4ee5\u9002\u5e94\u81ea\u5df1\u7684\u8981\u6c42. \u800c\u4e14\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u8bf4\u662f\u4fee\u6539\u6700\u5c11\u7684\u4e3b\u9898\u5236\u4f5c\u65b9\u6cd5.\u90a3\u4e48, \u5c31\u8ba9\u6211\u4eec\u4ee5\u00a0<a title=\"Thematic Theme Framework\" href=\"http:\/\/themeshaper.com\/thematic\/\" rel=\"designer\">Thematic Theme Framework<\/a>\u00a0\u4e3a\u4f8b\u6765\u8c08\u8c08\u4e3b\u9898\u521b\u4f5c\u5427. \u8fd9\u4e2a\u6846\u67b6\u662f\u7528\u5f97\u6bd4\u8f83\u706b\u7684\u6846\u67b6\u4e4b\u4e00.<br \/>\n\u5148\u7ed9\u51fa\u51e0\u4e2a\u6709\u7528\u7684\u94fe\u63a5:<\/p>\n<ol>\n<li><a href=\"http:\/\/themeshaper.com\/modify-wordpress-themes\/\" target=\"_blank\">\u57fa\u4e8e\u7236\u4e3b\u9898\u6765\u521b\u5efa\u4e3b\u9898\u7684\u6559\u7a0b<\/a><\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/themes\/thematic\" target=\"_blank\">Thematic \u4e0b\u8f7d<\/a><\/li>\n<li><a href=\"http:\/\/themeshaper.com\/guide-customizing-thematic-theme-framework\/\" target=\"_blank\">Thematic \u4f7f\u7528\u6307\u5357<\/a><\/li>\n<li>\u4e00\u4e9b\u57fa\u4e8eThematic\u5df2\u7ecf\u5236\u4f5c\u597d\u7684<a href=\"http:\/\/themeshaper.com\/category\/thematic-child-themes\/\" target=\"_blank\">\u5b50\u4e3b\u9898<\/a>(child theme): \u53ef\u4ee5\u7528\u4f5c\u53c2\u8003\u54e6<\/li>\n<\/ol>\n<\/li>\n<li><strong>\u5b50\u4e3b\u9898\u7684\u521b\u5efa<\/strong><br \/>\n\u5927\u6982\u6d4f\u89c8\u5b8c\u4e0a\u9762\u7684\u94fe\u63a5\u4f60\u5c31\u57fa\u672c\u80fd\u591f\u5f00\u59cb\u4e86. \u9996\u5148\u5728WP\u7684\\wp-content\\themes\\\u4e0b\u65b0\u5efa\u4e00\u4e2achildtheme\u6587\u4ef6\u5939, \u91cc\u9762\u65b0\u5efa\u4e24\u4e2a\u6587\u4ef6, \u4e00\u4e2a\u662fstyle.css, \u4e00\u4e2a\u662ffunctions.php. \u5173\u4e8e\u4ed6\u4eec\u5404\u81ea\u7684\u4f5c\u7528, \u53ca\u5177\u4f53\u7684\u5185\u5bb9, \u8bf7\u770b\u4e0a\u9762\u7ed9\u51fa\u7684\u4f7f\u7528\u6307\u5357. \u5176\u5b9e\u4e3b\u8981\u662fstyle.css\u7684\u4e66\u5199, \u4e00\u5b9a\u8981\u6709Theme Name: \u4e00\u9879. \u5176\u4ed6\u7684\u53ef\u4ee5\u9009\u586b. \u7136\u540e\u5c31\u662f\u5bfc\u5165\u51e0\u4e2a\u57fa\u672c\u7684css:<\/p>\n<pre>\n\/*\ntitle=\"\"\nTheme Name: Chiron\nDescription: A Child Theme of Thematic.\nTemplate: thematic\n*\/\n\n\/* Using @import, we can borrow style sheets from the Parent Theme *\/\n\n\/* Reset the browser defaults *\/\n@import url('..\/thematic\/library\/styles\/reset.css');\n\n\/* Apply default typography *\/\n@import url('..\/thematic\/library\/styles\/typography.css');\n\n\/* Add WordPress image styles *\/\n@import url('..\/thematic\/library\/styles\/images.css');\n\n\/* Add a basic layout *\/\n@import url('..\/thematic\/library\/layouts\/2c-l-fixed.css');\n\n\/* Start with some default styles *\/\n@import url('..\/thematic\/library\/styles\/18px.css');\n<\/pre>\n<p>\u63a5\u4e0b\u6765\u4f60\u5c31\u53ef\u4ee5\u5199\u81ea\u5df1\u7684style\u4e86, \u53ef\u4ee5\u628adefault.css\u590d\u5236\u4e00\u4efd\u5230\u8fd9\u91cc, \u7136\u540e\u4f5c\u9002\u5f53\u4fee\u6539\u5c31ok\u5566.<\/p>\n<p>\u6700\u540e, \u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 functions.php \u6765\u4fee\u6539\u7236\u4e3b\u9898\u7684\u884c\u4e3a, \u4e3b\u8981\u7684\u53c2\u8003\u6709<\/p>\n<ol>\n<li><a href=\"http:\/\/themeshaper.com\/thematic\/guide\/?page_id=12\" target=\"_blank\">Thematic \u6ee4\u5b50<\/a>\u00a0(filters), \u4fee\u6539\u4e3b\u9898\u529f\u80fd\u5fc5\u7528<\/li>\n<li><a href=\"http:\/\/themeshaper.com\/thematic\/guide\/?page_id=10\" target=\"_blank\">Thematic \u94a9\u5b50<\/a>\u00a0(Hooks), \u4fee\u6539\u4e3b\u9898\u529f\u80fd\u5fc5\u7528<\/li>\n<li><a href=\"http:\/\/themeshaper.com\/forums\/\" target=\"_blank\">Thematic \u652f\u6301\u8bba\u575b<\/a><br \/>\n\u5229\u7528\u8fd9\u4e9b\u6ee4\u5b50\u548c\u94a9\u5b50, \u4f60\u5f88\u5bb9\u6613\u7684\u4fee\u6539\u4e3b\u9898\u7684\u884c\u4e3a. \u6211\u90fd\u662f\u770b\u7740\u4f8b\u5b50\u6539\u7684.<\/li>\n<\/ol>\n<\/li>\n<li><strong>\u4e3b\u9898\u8bed\u8a00\u5305\u7684\u5236\u4f5c:\u6c49\u5316<br \/>\n<\/strong>\u5176\u5b9e\u5f88\u7b80\u5355, \u60f3\u6cd5\u5c31\u662f\u63d0\u53d6\u4e3b\u9898\u91cc\u9762\u7684\u56fd\u9645\u5316\u5b57\u7b26\u4e32, \u5373_e() \u4ee5\u53ca__(). \u8fd9\u91cc\u7ed9\u51fa\u4e24\u4e2a\u5de5\u5177:<\/p>\n<ol>\n<li><a href=\"http:\/\/www.poedit.net\/\">PoEdit<\/a>: \u5c06.pot, .po\u7ffb\u8bd1\u6210mo, \u4f3c\u4e4e\u8bf4\u53ef\u4ee5\u63d0\u53d6php\u7684\u56fd\u9645\u5316\u5b57\u7b26\u4e32. \u4f46\u662f\u672c\u4eba\u672a\u5b9e\u9a8c\u6210\u529f.<\/li>\n<li><a href=\"http:\/\/www.icanlocalize.com\/tools\/php_scanner\">icanlocalize.com<\/a>: \u5728\u7ebf\u63d0\u53d6php\u6587\u4ef6\u4e2d\u7684\u56fd\u9645\u5316\u5b57\u7b26\u4e32.<br \/>\n\u5728\u8fd9\u91cc, \u6211\u60f3\u7a0d\u5fae\u8c08\u4e0b\u81ea\u5df1\u7684\u4f53\u4f1a. \u5176\u5b9e\u4e00\u4e2a\u7b80\u5355\u7684po\u6587\u4ef6\u5982\u4e0b:<\/p>\n<pre>\nmsgid \"\"\nmsgstr \"\"\n\"Content-Type: text\/plain; charset=utf-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#. Text in echo\n#: search.php:53\nmsgid \"Find\"\nmsgstr \"\"\n\n#. Text in echo\n#: search.php:46\nmsgid \"Nothing Found\"\nmsgstr \"\"<\/pre>\n<p>\u4f60\u53d1\u73b0\u4ec0\u4e48, \u5176\u5b9e\u6bcf\u4e2a\u56fd\u9645\u5316\u5b57\u7b26\u4e32\u5c31\u662f\u7528\u56db\u884c\u6765\u8868\u793a\u7684, \u00a0\u4f8b\u5982&#8221;Find&#8221;, msgid \u8868\u793a\u7684\u662f\u539f\u5b57\u7b26\u4e32\u5373php\u4e2d_e(&#8216;Find&#8217;, &#8216;youthemetag&#8217;)\u6216\u8005__(&#8216;Find&#8217;, &#8216;yourthemetag&#8217;)\u4e2d\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u4e32, \u800cmsgstr \u5c31\u662f\u6211\u4eec\u8981\u7ffb\u8bd1\u540e\u7684\u5b57\u7b26\u4e32\u4e86. \u6240\u4ee5\u5f88\u7b80\u5355, \u5c31\u662f\u624b\u52a8\u4e5f\u53ef\u4ee5\u7ffb\u8bd1.<\/p>\n<p>\u4f46\u662f\u5173\u952e\u5728\u6700\u540e, \u6211\u4eec\u8981\u5728php\u4e2d\u52a0\u5165\u4e00\u53e5\u6765\u4f7f\u7528\u7ffb\u8bd1\u540e\u7684\u8bed\u8a00\u5305:<\/p>\n<pre>\nadd_action( 'after_setup_theme', 'graphene_child_setup' );\nfunction graphene_child_setup() {\n    \/* Load the child theme's gettext file *\/\n    load_child_theme_textdomain( 'yourthemetag', get_stylesheet_directory() . '\/languages' );\n}<\/pre>\n<p>\u5173\u952e\u5c31\u662f\u540e\u4e00\u53e5, yourthemetag\u5c31\u662f\u7ffb\u8bd1\u7684\u6807\u7b7e, \u800c\u540e\u4e00\u4e2a\u5c31\u662fzh_CN.mo\u6240\u5728\u7684\u76ee\u5f55, \u8fd9\u91cc\u7528\u7684\u662f\u5b50\u4e3b\u9898\u7684style.css\u6240\u5728\u76ee\u5f55\u4e0b\u7684languages\u76ee\u5f55\u4e2d.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>\u81f3\u6b64, \u5927\u529f\u544a\u6210, \u4f60\u7684\u4e3b\u9898\u5df2\u7ecf\u5236\u4f5c\u5b8c\u6210, \u770b\u770b\u80fd\u5426\u901a\u8fc7HTML, CSS \u9a8c\u8bc1\u5427.<\/p>\n<p>\u6700\u540e, \u5982\u679c\u4e0d\u662f\u7528\u7684thematic\u6846\u67b6, \u53ef\u4ee5\u53c2\u8003\u300a<a href=\"http:\/\/www.wordpress.la\/how-to-make-a-translatable-wordpress-theme.html\" target=\"_blank\">\u521b\u5efa\u4e00\u4e2a\u53ef\u7ffb\u8bd1\u7684WordPress\u6a21\u677f<\/a>\u300b\u8c03\u7528\u8bed\u8a00\u5305.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u8bb0 \u4f7f\u7528WP\u4e5f\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86, \u4e00\u5f00\u59cb\u662f\u522b\u4eba\u95ee\u6211\u600e\u4e48\u628aLaTeX\u5199\u7684\u6f02\u4eae\u7684\u516c\u5f0f\u642c &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=77\"> <span class=\"screen-reader-text\">\u6d45\u8c08WP\u4e3b\u9898\u5236\u4f5c&#8212;\u5feb\u901f\u521b\u5efaSEO\u8fc7\u7684\u4e3b\u9898<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[590,618,683,132,331,412],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-admin","tag-po","tag-seo","tag-wp","tag-132","tag-331","tag-412"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=77"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}