{"id":33202,"date":"2024-11-25T11:27:28","date_gmt":"2024-11-25T03:27:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/33202\/"},"modified":"2024-11-25T11:27:28","modified_gmt":"2024-11-25T03:27:28","slug":"wordpress%e6%80%8e%e4%b9%88%e6%94%b9%e5%ad%97%e4%bd%93","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/33202\/","title":{"rendered":"wordpress\u600e\u4e48\u6539\u5b57\u4f53"},"content":{"rendered":"<blockquote><p>\n  wordpress \u63d0\u4f9b\u4e86\u51e0\u79cd\u65b9\u6cd5\u6765\u66f4\u6539\u5b57\u4f53\uff1a1. \u4f7f\u7528\u5185\u7f6e\u5b57\u4f53\u9009\u9879\uff1b2. \u5b89\u88c5 google \u5b57\u4f53\uff1b3. \u4f7f\u7528\u5b57\u4f53\u63d2\u4ef6\uff08\u4f8b\u5982 easy google fonts\uff09\uff1b4. \u4f7f\u7528\u81ea\u5b9a\u4e49 css\u3002\u53ef\u4ee5\u901a\u8fc7\u201c\u5916\u89c2\u201d&gt;\u201c\u5b9a\u5236\u201d&gt;\u201c\u9644\u52a0 css\u201d\u4fee\u6539\u5b57\u4f53\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/15\/2024041517004475012.jpg\" class=\"aligncenter\" title=\"wordpress\u600e\u4e48\u6539\u5b57\u4f53\u63d2\u56fe\" alt=\"wordpress\u600e\u4e48\u6539\u5b57\u4f53\u63d2\u56fe\" \/><\/p>\n<p><strong>WordPress \u5982\u4f55\u66f4\u6539\u5b57\u4f53<\/strong><\/p>\n<p><strong>\u4fee\u6539 WordPress \u5b57\u4f53\u7684\u65b9\u6cd5<\/strong><\/p>\n<p><strong>1. \u4f7f\u7528 WordPress \u81ea\u5e26\u7684\u5b57\u4f53\u9009\u9879<\/strong><\/p>\n<p>WordPress \u9ed8\u8ba4\u63d0\u4f9b\u4e86\u6709\u9650\u7684\u5b57\u4f53\u9009\u9879\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fdb\u5165\u201c\u5916\u89c2\u201d&gt;\u201c\u5b9a\u5236\u201d&gt;\u201c\u9644\u52a0 CSS\u201d\u6765\u8bbf\u95ee\u8fd9\u4e9b\u9009\u9879\u3002\u5728 CSS \u5b57\u6bb5\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>body {\n  font-family: \"\u5b57\u4f53\u540d\u79f0\";\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06\u201c\u5b57\u4f53\u540d\u79f0\u201d\u66ff\u6362\u4e3a\u60a8\u8981\u4f7f\u7528\u7684\u5b57\u4f53\u540d\u79f0\u3002<\/p>\n<p><strong>2. \u5b89\u88c5 Google \u5b57\u4f53<\/strong><\/p>\n<p>Google Fonts \u63d0\u4f9b\u4e86\u591a\u79cd\u514d\u8d39\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u5b57\u4f53\u3002\u8981\u5b89\u88c5 Google \u5b57\u4f53\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<ul>\n<li>\u5728 Google Fonts \u7f51\u7ad9\u4e0a\u9009\u62e9\u5b57\u4f53\u3002<\/li>\n<li>\u5355\u51fb\u201c \u062e\u0627\u0646\u0648\u0627\u062f\u0647\u201d\u9009\u9879\u5361\u3002<\/li>\n<li>\u590d\u5236 @import \u89c4\u5219\u3002<\/li>\n<li>\u5bfc\u822a\u5230\u60a8\u7684 WordPress \u4eea\u8868\u76d8\uff0c\u8f6c\u5230\u201c\u5916\u89c2\u201d&gt;\u201c\u5b9a\u5236\u201d&gt;\u201c\u9644\u52a0 CSS\u201d\u3002<\/li>\n<li>\u5c06 @import \u89c4\u5219\u7c98\u8d34\u5230 CSS \u5b57\u6bb5\u4e2d\u3002<\/li>\n<\/ul>\n<p><strong>3. \u4f7f\u7528\u5b57\u4f53\u63d2\u4ef6<\/strong><\/p>\n<p>\u6709\u8bb8\u591a WordPress \u63d2\u4ef6\u53ef\u4ee5\u5e2e\u52a9\u60a8\u66f4\u6539\u5b57\u4f53\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>Easy Google Fonts<\/li>\n<li>Ultimate Fonts<\/li>\n<li>WP Custom Fonts<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u63d2\u4ef6\u63d0\u4f9b\u4e86\u6bd4 WordPress \u9ed8\u8ba4\u9009\u9879\u66f4\u591a\u7684\u81ea\u5b9a\u4e49\u9009\u9879\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>\u66f4\u6539\u4efb\u4f55\u5143\u7d20\u7684\u5b57\u4f53\uff08\u6807\u9898\u3001\u6b63\u6587\u3001\u4fa7\u8fb9\u680f\u7b49\uff09<\/li>\n<li>\u4ece\u5e7f\u6cdb\u7684\u5b57\u4f53\u5e93\u4e2d\u9009\u62e9\u5b57\u4f53<\/li>\n<li>\u4e0a\u4f20\u81ea\u5b9a\u4e49\u5b57\u4f53<\/li>\n<\/ul>\n<p><strong>4. \u4f7f\u7528\u81ea\u5b9a\u4e49 CSS<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u719f\u6089 CSS\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u81ea\u5b9a\u4e49 CSS \u66f4\u6539 WordPress \u4e2d\u7684\u4efb\u4f55\u6587\u672c\u5143\u7d20\u7684\u5b57\u4f53\u3002\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\u5230\u60a8\u7684\u4e3b\u9898\u7684\u6837\u5f0f\u8868\u6216 WordPress \u7684\u201c\u9644\u52a0 CSS\u201d\u5b57\u6bb5\u4e2d\uff1a<\/p>\n<pre>#my-element {\n  font-family: \"\u5b57\u4f53\u540d\u79f0\";\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06\u201c#my-element\u201d\u66ff\u6362\u4e3a\u8981\u66f4\u6539\u5b57\u4f53\u6837\u5f0f\u7684\u5143\u7d20\u7684 ID \u6216\u7c7b\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u6539\u5b57\u4f53\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>wordpress \u63d0\u4f9b\u4e86\u51e0\u79cd\u65b9\u6cd5\u6765\u66f4\u6539\u5b57\u4f53\uff1a1. \u4f7f\u7528\u5185\u7f6e\u5b57\u4f53\u9009\u9879\uff1b2. \u5b89\u88c5 google \u5b57\u4f53\uff1b3. \u4f7f\u7528\u5b57\u4f53\u63d2\u4ef6\uff08\u4f8b\u5982 easy google fonts\uff09\uff1b4. \u4f7f\u7528\u81ea\u5b9a\u4e49 css\u3002\u53ef\u4ee5\u901a\u8fc7\u201c\u5916\u89c2\u201d&gt;\u201c\u5b9a\u5236\u201d&gt;\u201c\u9644\u52a0 css\u201d\u4fee\u6539\u5b57\u4f53\u3002 WordPress \u5982\u4f55\u66f4\u6539\u5b57\u4f53 \u4fee\u6539 WordPress \u5b57\u4f53\u7684\u65b9\u6cd5 1. \u4f7f\u7528 WordPress \u81ea\u5e26\u7684\u5b57\u4f53\u9009\u9879 WordPress \u9ed8\u8ba4\u63d0\u4f9b\u4e86\u6709\u9650\u7684\u5b57\u4f53\u9009\u9879\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fdb\u5165\u201c\u5916\u89c2\u201d&gt;\u201c\u5b9a\u5236\u201d&gt;\u201c\u9644\u52a0 CSS\u201d\u6765\u8bbf\u95ee\u8fd9\u4e9b\u9009\u9879\u3002\u5728 CSS \u5b57\u6bb5\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a body { font-family: &#8220;\u5b57\u4f53\u540d\u79f0&#8221;; } \u767b\u5f55\u540e\u590d\u5236 \u5c06\u201c\u5b57\u4f53\u540d\u79f0\u201d\u66ff\u6362\u4e3a\u60a8\u8981\u4f7f\u7528\u7684\u5b57\u4f53\u540d\u79f0\u3002 2. \u5b89\u88c5 Google \u5b57\u4f53 Google Fonts \u63d0\u4f9b\u4e86\u591a\u79cd\u514d\u8d39\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u5b57\u4f53\u3002\u8981\u5b89\u88c5 Google \u5b57\u4f53\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a \u5728 Google Fonts \u7f51\u7ad9\u4e0a\u9009\u62e9\u5b57\u4f53\u3002 \u5355\u51fb\u201c \u062e\u0627\u0646\u0648\u0627\u062f\u0647\u201d\u9009\u9879\u5361\u3002 \u590d\u5236 @import \u89c4\u5219\u3002 \u5bfc\u822a\u5230\u60a8\u7684 WordPress \u4eea\u8868\u76d8\uff0c\u8f6c\u5230\u201c\u5916\u89c2\u201d&gt;\u201c\u5b9a\u5236\u201d&gt;\u201c\u9644\u52a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-33202","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=33202"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33202\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=33202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=33202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=33202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}