I just discovered, via Greg Linch, Lisa Williams’ blog about learning to program as a summer project. Despite the best intentions, I’ve fallen behind on my own plans in that area, so Lisa’s project inspired me to take stock of where I’m at and set a few goals.
There are three main areas I’m trying to learn more about:
- HTML and CSS.
- The ins and outs of WordPress themes.
- PHP scripting.
There’s one small project that I think I can take in stages that will hit all of those areas. It’s creating a “Quick Links” section below a site’s main navigation to add prominence to important pages without interfering with the logic of the site’s navigational structure.
We have this feature on our website at work and it’s really useful, so I wanted to find a way to duplicate it in WordPress. (The image above is from the website for Art-A-Licious, an art festival in downtown Adrian. Gratuitous plug: If you’re in southeast Michigan or northwest Ohio, come to Adrian on the third weekend of September. It’ll be a great time.)
My first step was the clunkiest: Going into the theme’s header.php file and dropping a block of HTML code in there. It worked. But navigation links are part of a site’s content, and any solution that requires you to edit the template files just to update content isn’t a very good one.
The next step was to remove the need to go into the template to edit the content. Following one of the lessons in Smashing WordPress Themes, I added a widget area to the header in the Twenty Ten theme (basically retyping lines of PHP from the book without any real understanding; the comprehension comes next). But all the styling for the Quick Links menu is sitting right there in the widget, just waiting to be messed up by a typo or a mouse click in the wrong place. So what’s next?
The next step is to learn how to move the styling into the theme’s stylesheets, where it belongs. But after that — how much better would it be if, instead of having to manually type all the a href=blah blah blahs into the widget, you could use WordPress’ existing menu functionality to reduce the entire process to a drag-and-drop operation?
And after that, how much cooler would it be to create a plugin that would allow anyone to add a Quick Links menu to their site, without needing to write a single line of code?
So that’s the project. I’ve loaded up on books and I’m becoming good friends with the W3schools website. It feels good to learn something new. And if anyone has any great beginning PHP books to recommend, please let me know.


I started learning PHP (and some MySQL) through SitePoint; specifically, this book and this online course they offer.
Here are some PHP-related links I’ve bookmarked that may be helpful.
Good luck!
Hey, found your blog after Greg tweeted it. :) Couple of thoughts:
- You should definitely be using a child theme if you aren’t already. This allows you to draw on all of the functionality and design of your original theme, but you won’t lose any of your customization when you update the original theme. My favorite WordPress child-themeing tute (and a decent beginner’s PHP intro): http://themeshaper.com/2009/04/17/wordpress-child-theme-basics/
- Be aware that not everything on w3schools is best practice. (for a further explanation, see w3fools.com)
- For in-depth tutorials, nothing beats lynda.com.
- WP themes are great for learning CSS, but seem kind of frustrating for learning anything more than basic HTML. Because you’re so often trying to figure out how to restructure someone else’s code, or tracking down which bits of code are causing a specific behavior, it can be tough to learn exactly what the expected and proper outcome of something is. (Thinking about it, this is true for the more complicated CSS, too.) One way to minimize this is to start building templates for pages/post types.
- You’re using my fav method of learning: picking a project with specific goals. And that’s enough unsolicited advice from a stranger. Good luck!
Greg and Heather, thanks for the tips and the links. And I haven’t been using a child theme, but I’m definitely going to start.