{"id":6561,"date":"2012-08-14T21:39:53","date_gmt":"2012-08-15T02:39:53","guid":{"rendered":"http:\/\/www.allyngibson.net\/?p=6561"},"modified":"2012-08-14T21:39:53","modified_gmt":"2012-08-15T02:39:53","slug":"on-coding-and-more-coding","status":"publish","type":"post","link":"http:\/\/www.allyngibson.com\/?p=6561","title":{"rendered":"On Coding and More Coding"},"content":{"rendered":"<p>For a little while now I&#8217;ve been working on a new WordPress theme.<\/p>\n<p>Last summer, Bob Greenberger hired me to code a WordPress-powered website for him.  It turned out pretty well, and I decided that I would work on a new site for myself.<\/p>\n<p>I&#8217;d code something, spend a week or two with PHP and CSS, and get something that worked&#8230;<\/p>\n<p>And I&#8217;d scrap it.<\/p>\n<p>I went through this process four times, putting together a fully-functional WordPress theme and then starting over.<\/p>\n<p>By Christmas time, I had something that, I thought, worked.  It wasn&#8217;t ideal.  The underlying code was cutting edge for WordPress 2.6 or 2.7 &mdash; the base theme that I was using, becasue its code was clean and easy to work with, was written for a several years old era of WordPress.<\/p>\n<p>In March I changed direction, and I started working off of a much more recent WordPress code base.  I&#8217;d tinker with it, here and there, and I finally had something that was good.<\/p>\n<p>But I didn&#8217;t like it.<\/p>\n<p>In June, I went back to the very beginning.  I knew what I wanted it to look like facing out, and I knew what I wanted it to look like under the hood.  I said to myself, &#8220;Okay, I have this theme, and it&#8217;s my code base, and I&#8217;m not touching it.  I&#8217;m going to build a child theme, and it&#8217;s going to go on top of the code base (but separate, since that&#8217;s how child themes work), and it will be good.&#8221;<\/p>\n<p>I&#8217;ve been tackling it in stages.  I&#8217;ve been revisiting some of my old work and rewriting where necessary.  Tonight, for instance, I recoded a piece of code I cobbled together a long time ago, a page template (for creating a static page in the WordPress page heirarchy) that calls the content of specified blog post.  What I came up with tonight was simpler and more elegant than what I&#8217;m currently using on my blog today.<\/p>\n<p>The base WordPress theme that I&#8217;m using is <a href=\"http:\/\/argoproject.org\/\">Argo<\/a>, a WordPress theme developed by NPR for some of their member stations.  What intrigued me about this theme was the way that it had a number of features built in that interested me, like social links and related posts.  It&#8217;s a blog theme designed for multimedia posts (since it was designed with NPR&#8217;s needs in mind) that also had a nice look.  I decided I could work with that.<\/p>\n<p>But it needed something.  I like the way my website is currently constituted.  I like that there&#8217;s content spotlighted on the front page in a magazine-esque style.  My goal, then, was to build a magazine-style front-end onto a blog theme that wasn&#8217;t designed for it.<\/p>\n<p>It&#8217;s actually working out pretty well.  Things are working the way I want them to.<\/p>\n<p>What I want is something that&#8217;s both a blog and a professional site.  This is something that, in my opinion, isn&#8217;t pulled off particularly well in virtually every case.  People keep their online journals separate from their professional sites because they&#8217;re not really designed to go together (especially when they&#8217;re using someone else&#8217;s service &mdash; and someone else&#8217;s servers) to handle one or both of these functions.<\/p>\n<p>What I&#8217;m doing will pull it all together and make it sing.<\/p>\n<p>That&#8217;s why I need something that can take a blog post and make it into a static page.<\/p>\n<p>Or why I&#8217;ve enabled Categories on WordPress pages (and then using a filter hook to exclude certain categories from the wp_list_pages function).<\/p>\n<p>And no, I don&#8217;t expect that to make much sense to anyone other than me.<\/p>\n<p>Do I have a timeframe for completion?<\/p>\n<p>Eh, probably within the next month.  It&#8217;s actually very close.  I&#8217;ve created all the new files for the child theme that I need.  The next step is to go through the parent theme, review each of its PHP files, and see if they need replacing in the child theme.  Thus far, I&#8217;ve only done that with one file.  It&#8217;s possible that there will be others.<\/p>\n<p>And then, I&#8217;m going to go back through the files I&#8217;ve created and make sure I don&#8217;t have any extraneous code or functions clogging up the pipes.  Which is, actually, entirely possible.<\/p>\n<p>I also need to consider how social sharing will be done.  There was a plugin I saw in use on other blogs, and though I liked the way it looked elsewhere, I didn&#8217;t like the look here.<\/p>\n<p>Suffice it to say, it&#8217;s been an interesting experience.<\/p>\n<p>Oh, and what am I calling it?<\/p>\n<p>Since the base theme is called &#8220;Argo,&#8221; I&#8217;m calling my child theme &#8220;Argonath,&#8221; after those great carved statues on the River Anduin.  Entirely appropriate, I think. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a little while now I&#8217;ve been working on a new WordPress theme. Last summer, Bob Greenberger hired me to code a WordPress-powered website for him. It turned out pretty well, and I decided that I would work on a new site for myself. I&#8217;d code something, spend a week or two with PHP and<a class=\"more-link\" href=\"http:\/\/www.allyngibson.com\/?p=6561\">Continue reading <span class=\"screen-reader-text\">&#8220;On Coding and More Coding&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4095],"tags":[57,117,4123,4096],"class_list":["post-6561","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-css","tag-html","tag-npr","tag-wordpress","entry"],"_links":{"self":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/posts\/6561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6561"}],"version-history":[{"count":0,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=\/wp\/v2\/posts\/6561\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6561"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.allyngibson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}