So far, whenever I’ve built a site on WordPress I’ve started by combing through pages and pages of pre-made themes. Generally I pay little attention to any styling, graphics, colors etc. and look for a theme with a good layout to suit my needs. I have a preference for designs with a header, 2-column body – wider column on the left for content and narrower on the right for widgets – and a simple footer at the bottom.
I’ve gotten pretty decent at restyling the themes but there’s always something that I get stuck on. Something I can’t seem to style or work the way I want it to.
So a few months ago I started thinking it was time to figure out how to build a custom theme from scratch. I put it off for weeks until one morning I sat down find this informative article on Lifehacker’s site. The title alone gave me enough motivation to at least take it to the next step. I read the article, downloaded and installed their blank starter template on my website (I already have WordPress installed). It turns out that it requires a little more coding and styling than the article suggests, but it has been a great starting point.
My first goal was to get rid of the name of my site which is defaulted to be displayed in text and instead display my logo. It took a few tries but finally I got it to work by uploading my logo to the images folder within the theme and then adding a DIV within the Header DIV in the header.php file to reference the logo.
My site with this blank theme activated wasn’t displaying the Content (wide left column) DIV and the Primary (right column for widgets) DIV side by side like the Lifehacker pics showed. A little more poking through the style.css document, adding some float:left; tags and I got that working as I wanted it to.
From here I’m going to work on styling the text fonts, sizes and colors, get the main menu to align to the right of the page and figure out how to align the whole site in the center of the browser instead of hugging the left hand side like it’s defaulted to do. Since I’m a graphics guy and not a developer, I’m sure this takes me a lot longer than it could, but I’m learning a lot as I force myself to do it.
My hope is to gain enough of an understanding of how all the files in a WordPress theme work together so that I can develop a fairly standard template of my own to make future WordPress projects easier and faster. My current site displays blog posts with a thumbnail graphic and a small sampling of article text followed by a “Read More” button. I have a feeling figuring out how to do this will present quite a challenge to me but I’m up for it.




















