{"id":88,"date":"2014-07-18T19:07:31","date_gmt":"2014-07-18T23:07:31","guid":{"rendered":"http:\/\/wfredk.com\/blog\/?p=88"},"modified":"2014-07-18T19:07:31","modified_gmt":"2014-07-18T23:07:31","slug":"my-own-blog-theme-finally","status":"publish","type":"post","link":"https:\/\/wfredk.com\/blog\/2014071819\/my-own-blog-theme-finally","title":{"rendered":"My own blog theme &#8211; finally!"},"content":{"rendered":"<p>Since I first installed WordPress and set up my blog on this site, it&#8217;s been using the pixeled theme, which was OK &#8211; but it made my blog look like something attached to my site with bubble gum, duct tape and baling wire &#8211; it didn&#8217;t fit in.  Among other things, while it was easy to pick a menu item from my home page to get to my blog, there wasn&#8217;t a link in the reverse direction:  Once you were in my blog, there was no going back to the rest of my site unless you used your browser&#8217;s <Back> button or re-entered the Web address.  I&#8217;ve never really been happy with it, but I also had the impression it would take a significant investment of time and effort to build my own WordPress theme.<\/p>\n<p>I read through a couple of tutorials Monday night (July 14) and got a rather different perspective:  Between having delved into the workings of WordPress when I was contracting at MIT Sloan School last year, and the presentation in the tutorials, I thought it might not be too much work, after all, to create my own theme, to make my blog fit into my site smoothly.<\/p>\n<p>I started working on creating my theme about 9:30 Monday evening.  By 2AM I&#8217;d made a couple of slight changes, but most of the time had gone into cleaning up the ghastly code I was trying to adapt.  Who was the VisualBasic idiot that came up with the if: endif type of conditionals for PHP?  Brackets are <strong><em>much<\/em><\/strong> easier to follow &#8211; and to make sure you&#8217;ve got your blocks properly closed!  I&#8217;ve got WordPress 3.8.1 running here, so there&#8217;s no need for pre-2.7 code &#8211; gack!<\/p>\n<p>I had to take a break from 2AM until about 3:15 to post another picture on <a href=\"http:\/\/PhotoByFred.com\" title=\"Photo by Fred, your daily dose of art!\" target=\"_blank\">Photo By Fred<\/a>, and to validate Tuesday&#8217;s entries for the <a href=\"http:\/\/L5Development.com\/go?SpaceHistory\" title=\"the Space History newsletter from L5 Development Group\" target=\"_blank\">Space History newsletter<\/a>.  After installing my barely changed theme on my blog, it took practically <em>two hours<\/em> just to get back to where it would display again:  There&#8217;s something wrong with the PHP installation at eApps and syntax errors in nested function calls aren&#8217;t being recorded in the error_log, so I had to trace through WordPress to find out where there was an extraneous close-bracket in one of the theme modules where I&#8217;d been optimizing the code, and a missing close bracket in another module where I&#8217;d missed a VisualBasic PHP block being closed.<\/p>\n<p>Once I got the theme to display, I started modifying it, an iterative process that kept going and going and &#8230;.  Eventually it converged on a solution, and before 11:30 Tuesday morning I&#8217;d gotten to where I was happy with the way it looks:  My blog now looks like an integral part of the site, and I&#8217;m pretty comfortable with the color scheme and layout (at least for the moment).<\/p>\n<p>There are still HTML validation errors because the AddThis plugin uses the same ID for every element on the page and doesn&#8217;t escape ampersands the way it&#8217;s supposed to, but those problems are common enough that most browsers handle them without taking particular notice.  I should probably submit bug reports to the plugin&#8217;s developers.  I&#8217;ll get to it one of these days when I&#8217;ve got nothing to do and a staff to do it with&#8230;<\/p>\n<p>In the mean time, my blog has a new look and feel, and I&#8217;m happy with the way it works &#8211; so the roughly 12.75 hours of work I put into it paid off nicely.<\/p>\n<div id=\"spreadx\">&nbsp;<a href=\"http:\/\/digg.com\/submit?phase=2&url=https:\/\/wfredk.com\/blog\/2014071819\/my-own-blog-theme-finally\" target=\"_new\"><img decoding=\"async\" src=\"https:\/\/wfredk.com\/blog\/wp-content\/plugins\/spreadx\/images\/digg.gif\" alt=\"Digg\" border=\"0\" \/><\/a>&nbsp;&nbsp;<a href=\"http:\/\/www.facebook.com\/share.php?u=https:\/\/wfredk.com\/blog\/2014071819\/my-own-blog-theme-finally\" target=\"_new\"><img decoding=\"async\" src=\"https:\/\/wfredk.com\/blog\/wp-content\/plugins\/spreadx\/images\/facebook.gif\" alt=\"Facebook\" border=\"0\" \/><\/a>&nbsp;&nbsp;<a href=\"http:\/\/www.stumbleupon.com\/submit?url=https:\/\/wfredk.com\/blog\/2014071819\/my-own-blog-theme-finally&title=My+own+blog+theme+%26%238211%3B+finally%21\" target=\"_new\"><img decoding=\"async\" src=\"https:\/\/wfredk.com\/blog\/wp-content\/plugins\/spreadx\/images\/stumble.gif\" alt=\"StumbleUpon\" border=\"0\" \/><\/a>&nbsp;&nbsp;<a href=\"http:\/\/technorati.com\/faves?add=https:\/\/wfredk.com\/blog\/2014071819\/my-own-blog-theme-finally\" target=\"_new\"><img decoding=\"async\" src=\"https:\/\/wfredk.com\/blog\/wp-content\/plugins\/spreadx\/images\/technorati.gif\" alt=\"Technorati\" border=\"0\" \/><\/a>&nbsp;&nbsp;<a href=\"http:\/\/del.icio.us\/post?url=https:\/\/wfredk.com\/blog\/2014071819\/my-own-blog-theme-finally&title=My+own+blog+theme+%26%238211%3B+finally%21\" target=\"_new\"><img decoding=\"async\" src=\"https:\/\/wfredk.com\/blog\/wp-content\/plugins\/spreadx\/images\/delicious.gif\" alt=\"Deli.cio.us\" border=\"0\" \/><\/a>&nbsp;<\/div>","protected":false},"excerpt":{"rendered":"<p>Since I first installed WordPress and set up my blog on this site, it&#8217;s been using the pixeled theme, which was OK &#8211; but it made my blog look like something attached to my site with bubble gum, duct tape and baling wire &#8211; it didn&#8217;t fit in. Among other things, while it was easy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,14],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-progress-reports","category-web-development"],"_links":{"self":[{"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":3,"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wfredk.com\/blog\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}