{"id":3795,"date":"2019-12-08T10:27:54","date_gmt":"2019-12-08T02:27:54","guid":{"rendered":"https:\/\/blog.naibabiji.com\/?p=3795"},"modified":"2019-12-07T20:32:30","modified_gmt":"2019-12-07T12:32:30","slug":"add-post-thumbnails","status":"publish","type":"post","link":"https:\/\/blog.naibabiji.com\/news\/add-post-thumbnails.html","title":{"rendered":"wordpress\u53d1\u6587\u7ae0\u6ca1\u6709\u7279\u8272\u56fe\u7247\u4e86?\u4e0d\u89c1\u4e86\u5e2e\u4f60\u627e\u56de\u6765"},"content":{"rendered":"<p>\u7248\u672c\u5347\u7ea7\u6216\u8005\u66f4\u6362\u4e86\u4e00\u4e2a\u4e3b\u9898\uff0c\u53d1\u6587\u7ae0\u7684\u65f6\u5019\u6ca1\u6709\u770b\u5230\u4e0a\u4f20\u7279\u8272\u56fe\u7247\u7684\u4f4d\u7f6e\u4e86\u600e\u4e48\u529e\uff1f\u4e0d\u7528\u614c\u5f20\uff0c\u53ea\u9700\u8981\u6dfb\u52a0\u4e00\u4e32\u4ee3\u7801\u5c31\u53ef\u4ee5\u641e\u5b9a\u4e86\u3002<\/p>\n<p>\u5f53\u4f60\u78b0\u5230\u5bf9WordPress\u8fdb\u884c\u7248\u672c\u66f4\u65b0\u6216\u8005\u66f4\u6362\u4e86\u4e00\u4e2a\u4e3b\u9898\u540e\uff0c\u53d1\u73b0\u7f51\u7ad9\u7684\u7279\u8272\u56fe\u7247\u6dfb\u52a0\u5165\u53e3\u6d88\u5931\u4e86\u3002\u8fd9\u79cd\u60c5\u51b5\u901a\u5e38\u90fd\u662f\u7531\u4e8e\u4e3b\u9898\u4ee3\u7801\u91cc\u9762\u6ca1\u6709\u5ba3\u544a\u7279\u8272\u56fe\u7247\u5f15\u8d77\u7684\uff0c\u53ea\u9700\u8981\u590d\u5236\u4e0b\u9762\u7684\u4ee3\u7801\u6dfb\u52a0\u5230\u4e3b\u9898\u51fd\u6570\u6587\u4ef6functions.php\u91cc\u9762\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre>\/\/ \u7279\u8272\u56fe\u7247\u6846\r\nadd_theme_support('post-thumbnails');<\/pre>\n<p>\u5982\u679c\u4f60\u4e0d\u4f1a\u6dfb\u52a0\u7684\u8bdd\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u8fd9\u4e2a\u63d2\u4ef6\u5e2e\u5fd9\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/blog.naibabiji.com\/tutorial\/wordpress-code-snippets.html\">\u5b89\u5168\u6dfb\u52a0\u4ee3\u7801\u5230functions.php\u6587\u4ef6\u7684\u65b9\u6cd5\uff1aCode Snippets<\/a><\/li>\n<\/ul>\n<p>\u5982\u679c\u4f60\u8ba8\u538c\u624b\u52a8\u8bbe\u7f6e\u7279\u8272\u56fe\u7247\u7684\u8bdd\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u8fd9\u6b3e\u63d2\u4ef6\u5e2e\u4f60\u81ea\u52a8\u8bbe\u7f6e\u7279\u8272\u56fe\u7247\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/blog.naibabiji.com\/tutorial\/wordpress-random-post-thumbnails.html\">WordPress\u968f\u673a\u663e\u793a\u7279\u8272\u56fe\u7247\u63d2\u4ef6\uff1aRandom Post Thumbnails<\/a><\/li>\n<\/ul>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;3795&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;\u7ed9\u672c\u6587\u6253\u5206 post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;wordpress\u53d1\u6587\u7ae0\u6ca1\u6709\u7279\u8272\u56fe\u7247\u4e86?\u4e0d\u89c1\u4e86\u5e2e\u4f60\u627e\u56de\u6765&quot;,&quot;width&quot;:&quot;138&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 138px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            5\/5 - (1 vote)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7248\u672c\u5347\u7ea7\u6216\u8005\u66f4\u6362\u4e86\u4e00\u4e2a\u4e3b\u9898\uff0c\u53d1\u6587\u7ae0\u7684\u65f6\u5019\u6ca1\u6709\u770b\u5230\u4e0a\u4f20\u7279\u8272\u56fe\u7247\u7684\u4f4d\u7f6e\u4e86\u600e\u4e48\u529e\uff1f\u4e0d\u7528\u614c\u5f20\uff0c\u53ea\u9700\u8981\u6dfb\u52a0\u4e00\u4e32\u4ee3\u7801\u5c31\u53ef\u4ee5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"wordpress\u53d1\u6587\u7ae0\u6ca1\u6709\u7279\u8272\u56fe\u7247\u4e86?\u4e0d\u89c1\u4e86\u5e2e\u4f60\u627e\u56de\u6765 - \u5976\u7238\u5efa\u7ad9\u7b14\u8bb0","description":"\u7248\u672c\u5347\u7ea7\u6216\u8005\u66f4\u6362\u4e86\u4e00\u4e2a\u4e3b\u9898\uff0c\u53d1\u6587\u7ae0\u7684\u65f6\u5019\u6ca1\u6709\u770b\u5230\u4e0a\u4f20\u7279\u8272\u56fe\u7247\u7684\u4f4d\u7f6e\u4e86\u600e\u4e48\u529e\uff1f\u4e0d\u7528\u614c\u5f20\uff0c\u53ea\u9700\u8981\u6dfb\u52a0\u4e00\u4e32\u4ee3\u7801\u5c31\u53ef\u4ee5\u641e\u5b9a\u4e86\u3002 \u5f53\u4f60\u78b0\u5230\u5bf9WordPress\u8fdb\u884c\u7248\u672c\u66f4\u65b0\u6216\u8005\u66f4\u6362\u4e86\u4e00\u4e2a\u4e3b\u9898\u540e\uff0c\u53d1\u73b0\u7f51\u7ad9\u7684\u7279\u8272\u56fe\u7247\u6dfb\u52a0\u5165\u53e3\u6d88\u5931\u4e86\u3002\u8fd9\u79cd\u60c5\u51b5\u901a\u5e38\u90fd\u662f\u7531\u4e8e\u4e3b\u9898\u4ee3\u7801\u91cc\u9762\u6ca1\u6709\u5ba3\u544a\u7279\u8272\u56fe\u7247\u5f15\u8d77\u7684\uff0c\u53ea\u9700\u8981\u590d\u5236\u4e0b\u9762\u7684\u4ee3\u7801\u6dfb\u52a0\u5230\u4e3b\u9898\u51fd\u6570\u6587\u4ef6funct"},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3795","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/3795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/comments?post=3795"}],"version-history":[{"count":0,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/3795\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media?parent=3795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/categories?post=3795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/tags?post=3795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}