{"id":441,"date":"2005-10-18T05:36:47","date_gmt":"2005-10-18T00:06:47","guid":{"rendered":"http:\/\/tao.kaoart.info\/?p=80"},"modified":"2005-10-18T05:36:47","modified_gmt":"2005-10-18T00:06:47","slug":"%e5%a6%82%e4%bd%95%e5%8a%a0%e4%b8%80%e4%b8%aa%e9%9a%8f%e6%9c%ba%e5%9b%be%e7%89%87","status":"publish","type":"post","link":"https:\/\/tao0.date\/?p=441","title":{"rendered":"\u5982\u4f55\u52a0\u4e00\u4e2a\u968f\u673a\u56fe\u7247"},"content":{"rendered":"<p>I&rsquo;ve added a simple hack to the default Kubrick theme which displays a random header graphic. Here&rsquo;s how it works. I added the following function to the top of header.php:<\/p>\n<p>NOTE: this must come AFTER the doctype &amp; html lines.<\/p>\n<p><font face=\"Courier New\">&lt;?php<br \/>function header_graphic() {<br \/>echo &quot;\/images\/&quot;;<br \/>$num=rand(<\/font><font style=\"background-color: #339900\">0,8<\/font>);<br \/>echo &quot;<font style=\"background-color: #339900\">kubrickheader<\/font>&quot;.$num.&quot;.jpg&quot;;<br \/>};<br \/>?&gt;<\/p>\n<p>Next, I changed the style element for header as follows:<\/p>\n<p><font face=\"Courier New\">#header { background: url(&quot;&lt; ?php bloginfo(&#8216;stylesheet_directory&#8217;); header_graphic(); ?&gt;&ldquo;) no-repeat bottom center; }<br \/><\/font><\/p>\n<p>Finally, I saved several header graphics in my image directory named kubrickheader0.jpg through kubrickheader7.jpg.<\/p>\n<p>If you&rsquo;d like to see the different graphics, here they are:<\/p>\n<p>kubrickheader0.jpg<br \/>kubrickheader1.jpg<br \/>kubrickheader2.jpg<br \/>kubrickheader3.jpg<br \/>kubrickheader4.jpg<br \/>kubrickheader5.jpg<br \/>kubrickheader6.jpg<br \/>kubrickheader7.jpg<br \/>kubrickheader8.jpg<br \/>kubrickheader9.jpg<\/p>\n<p>\u7eff\u8272\u4e3a\u53ef\u6539\u533a\uff0c\u6839\u636e\u60c5\u51b5\u81ea\u5df1\u6539<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u52a0\u4e00\u4e2a\u968f\u673a\u56fe\u7247<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-441","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/tao0.date\/index.php?rest_route=\/wp\/v2\/posts\/441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tao0.date\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tao0.date\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tao0.date\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tao0.date\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=441"}],"version-history":[{"count":0,"href":"https:\/\/tao0.date\/index.php?rest_route=\/wp\/v2\/posts\/441\/revisions"}],"wp:attachment":[{"href":"https:\/\/tao0.date\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tao0.date\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tao0.date\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}