Customizing and Integrating WordPress Blogs
When we started designing LunarLincoln’s website we knew that we wanted to include a blog. I set out to find a blogging platform that would suit our needs; when I saw our hosting provider offered one-click WordPress installs, I was sold. I setup a subdomain to host the blog and had it up and running in no time. I wanted to fully integrate the blog into the website, so I did a quick Google search and found that I could pull content from WordPress using “The Loop“. Awesome, now I had a backend to handle managing the blog (it wasn’t properly themed, but we would be the only ones seeing it) and a beautifully themed front end for our visitors. I felt pretty good about this. I had successfully integrated WordPress into my website! Or had I? As we added blog posts, I kept having to add CSS rules to my for each new content type. Submitted a post with an image? Just a sec, let me put reasonable padding around that. Need to see more than 5 blog posts at a time on our website? Let me write a custom pager. Luckily the inherent laziness that has fueled so much of my engineering career kicked in and I decided there had to be a better way. I did another Google Search, digging a little deeper this time. It was amazing what I found in 15 minutes.
On most platforms, there’s the “right way” to do things and then there’s the “wrong way”. And I had inadvertently chosen the wrong way. An article from PressCoders set me straight (see Section 2: Rookie Mistakes). Turns out I didn’t have to hack WordPress to bend it to my whims, all I had to do was follow WordPress’s documentation to theme our blog correctly. Creating a custom theme in WordPress is fairly straightforward. First, find a theme that you like. Then create a child theme and override what you want to change. In our case a custom header and footer file combined with a bit of CSS did the trick. Once the theme was coded I rescued our stranded WordPress instance and moved it into a folder at our main domain. The finished product is what’s hosting this very blog post.
I’ve used this technique to help create a few other blogs as well. My good friend Chris Paz needed a video blog for his upcoming travel adventures. He uses certain design elements in his videos and wanted a blog theme to match. With his artwork I was able to set up a themed instance for him in under a day. Even Jennifer is getting into custom WordPress instances, employing no less than 2 on her newly redesigned portfolio page. What is perhaps most impressive about WordPress as a platform is that we’re all hosting different types of content. This blog is mainly for text, while Chris’s focuses on video and Jennifer’s includes works from her portfolio. It all looks great and is easy to manage, which lets us focus on creating content.
WordPress and I didn’t get along well at first and this project was a friendly reminder that I should research “the right way” to do things when I start working on a new platform. But all in I have to say I’m mighty impressed with WordPress at the moment. It feels good to ship, and I’ve gotten to help ship 3 of these blogs in the past month. Now I just need to write more blog posts…