Resource

WordPress Theme Customizer

January 24th, 2013

One of the most exciting features introduced in WordPress’s version 3.4 was the theme customizer. The theme customizer allows you to make a few changes and preview your site before activating it.

As a theme developer this means that there’s no longer a need to use a theme options page. Otto wrote a series of great articles detailing how theme developers can implement different options and even created a theme demo for us to play with.

Since then, other developers have written great tutorials on how they’ve integrated the code in their themes. Here are few good ones:

Adding a logo uploader to your WordPress theme with the Theme Customizer, by Kirk Wight
Using the WordPress Theme Customizer to choose between excerpts or full content, also by Kirk Wight
The WordPress Theme Customizer: a Comprehensive Developer’s Guide, by Alex Mansfield

These tutorials helped me immensely in a few recent projects. My new theme Color Palette has a logo uploader and a color scheme selector. My BLM Responsive starter theme has been updated and the links to social media sites are now located in the customizer instead of a separate theme options page.

If you’ve played around with the Theme Customizer and have come across interesting themes or tutorials or if you happen to have downloaded one of mine and have comments or suggestions, please let me know.

HTML, WordPress & Evolving Forms of Publishing

January 15th, 2013

The following notes are intended to accompany a lecture given at Simon Frase University as part of the Master of Publishing.

The 3.5 hour lecture will look at WordPress themes, templates, custom post types, the loop, functions and plugins used to create websites for the publishing industry.

Additional resources and links

Using and Installing Themes

Theme Development – What is it and what’s involved?

The Anatomy of a WordPress Theme – An infographic

Child Themes

Customizing your WordPress Theme using Firebug

Custom Post Types Generator

WordPress Default Loop

Interactive Guide to Blog Typography

December 20th, 2012

With small adjustments, you can noticeably improve the typography of any website. This interactive guide by Tommi Kaikkonen is superbly done. I would encourage to have a look.

Your readers will thank you.

Considering Freelancing?

November 14th, 2012

One of the reasons I love is teaching is to see how students evolve, progress and what they get up to after school. I haven’t looked at too many stats and this is not great research on my part, but most students who were more “design” inclined went on to do more classes, while the coders took on jobs. However during the course o the class, all of them always ask about freelancing and setting up their own company.

I’m pretty lucky that I’ve been able to experience both. I worked as a barrista for a few weeks back in 2000 and worked at a startup until the 2001 dot bomb exploded prior to going to going back to school. Following my time at BCIT, I started freelancing right away, but took on a job after about a year, at a company (that shall remain nameless), for only 6 months. I liked the job at the startup a lot, although the smell of money being burned got a bit overwhelming at times, but the other 2 jobs, not so much.

Freelancing has definitely been the right move for me. But is it the right move for everyone? If you’re considering a career as a freelancer, here are a couple of pieces that I think are worthwhile looking at.

Mike Monteiro, designer extraordinaire and author of Design is a Job (a must read for anyone, even non designers), wrote a great article a few months ago advising students to consider getting some experience before setting up their own firm. He makes a great case in point.

If you’re still not convinced by Mike’s argument and think to yourself that freelancing is the right path for you, you might want to check out Shane’s Freelance Primer.

Just fill in your email and you will get access to his one hour presentation on the subject. In his presentation Shane covers the basics of starting a business, getting all the paperwork done, finding great people to work with, finding great customers, most common mistakes, etc… This video is a great resource for anyone starting out and diving into freelancing.

The ThemeShaper WordPress Theme Tutorial: 2nd Edition

October 23rd, 2012

Back in June 2009, Ian Stewart wrote a fantastic tutorial called How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial. This tutorial proved very popular and useful for so many developers. So popular in fact, that a second edition has now just been launched. This tutorial consists on one lesson each day and uses Automattic’s Underscores (_s) as the starter theme.

If you’ve ever wanted to develop themes like an Automattician, now is your chance. Today’s first lesson entitled Develop Theme Sense covers what you need to know about WordPress themes and it’s file structure. It’s easier than you think and with the Automattic team behind you, it’s the perfect tutorial for anyone wanting to learn about theme building.

Responsive Theme and Patterns

September 30th, 2012

These past few weeks I finally started getting serious about responsive sites and finally completed my Bluelime Media website conversion. I started almost a year ago, but never got around to finish it. I had the chance to work on a few responsive sites this year and I predict that more and more websites will opt for responsiveness in the future, so as the saying goes, one must practice what you preach.

Lucky for me, Robert Dall at 32 Spokes, offered to help me convert the Bluelime Media HTML5 basic starter theme to a responsive version. Following an intense week of tweaking, refining and testing, I’m pleased to say that a responsive version of my starter theme is now available for anyone to grab on Github.

Like my other themes, this theme contains the bare minimum. The theme also only has one option for mobile navigation. There are loads of different options one could choose and one couldn’t possibly include them all.

If you’re looking for different responsive patterns, you might want to visit and bookmark Brad Frost’s collection of responsive patterns. Brad has compiled an amazing list of useful patterns and resources.

These are a few of my favourite plugins

August 22nd, 2012

At a recent WordPress Meetup, someone asked if there was a list of plugins that one should use. Such a list, of course, is not available and also impossible to put together. Every site has different needs, themes rely on various functionality and everyone is bound to have their favourites. This question was followed by everyone offering their favourite and I thought I would continue this discussion and post my list. First, let me stress that this list is made up of MY favourites. They are NOT the best (they might be, but I can’t say for sure), nor are they the ones I think YOU should use. They are simply the ones I find useful and use all the time.
Read more…

Setting up Custom Content Types using Stresslimit Custom Content Types plugin

August 17th, 2012

When Custom Post Types (CPT) became available with the release of WordPress 3.0 everyone was super excited about this new features and many tutorials came out explaining how to use them. These were super helpful and helped us get started and I must admit, CPT have made building WordPress sites truly pleasurable.

Some folks did point out though, that to set these up, the code needed was quite cumbersome. Of course smart folks came up with handy tools and plugins to solve this.

I was reluctant at first and didn’t think that the extra code needed was that difficult to manage, but Joey introduced me to the Stresslimit Custom Content Types plugin and I’ve been hooked on it ever since. It’s super easy to use. The plugin is designed for developers, so it doesn’t simply work out of the box, but once installed all you do is add the following to your functions.php:

sld_register_post_type( 'your-post-type' );

This new function simply extends register_post_type().

So for example, if you wanted to create a new content type called Products, you would use:

sld_register_post_type( 'product' );

It also supports the same arguments as register_post_type() so if you wanted to override the default ones, you could use something like this:

$product_args = array(
	'supports' => array( 'title', 'thumbnail' ),
	'menu_icon' => get_template_directory_uri() . '/images/admin-product.png',
	'public' => false,
);
sld_register_post_type( 'slide', $product_args );

This function works perfectly and displays a nice custom content type in our admin panel with a new icon which we’ve added to our theme file.

Things do go wrong though if you’ve omitted to upload the plugin or it gets deactivated accidentally. If that happens, you get the following error on your site:

Fatal error: Call to undefined function sld_register_post_type() in ...

As a developer, that’s not a big issue. Most of us know how to read error messages and know how to fix them, but it’s much more troubling when clients accidentally get these messages. It’s happened to me in the past and I immediately got a phone call. An easy way to avoid this is to first do a check to see if the plugin is installed, then call the function. WordPress allows you to do this easily with function_exists(). The code for our Product CPT would thus be like so:

include_once( ABSPATH . 'wp-admin/includes/plugin.php' );

if (function_exists( 'sld_register_post_type' )) {

$product_args = array(
	'supports' => array( 'title', 'thumbnail' ),
	'menu_icon' => get_template_directory_uri() . '/images/admin-product.png',
	'public' => false,
);
sld_register_post_type( 'slide', $product_args );

}

That’s it. Next time you’re working on a site needing custom content type, check it out. It makes things much easier.

Code Poet Interview

August 07th, 2012

Code Poet has been around for a while and back in May I wrote that the site was now transformed form a directory to a full resources site. Code Poet is a great place to find quizzes, free e-books and interviews. Last week, I had the pleasure of being interviewed by Krista Stevens and the interview is now live. This articles focuses on my teaching rather than theme building, but if you’ve ever wanted to know why I love WordPress, check it out.

WordPress Resources by Code Poet

May 21st, 2012

This weekend at WordCamp Seattle, I was pleased to hear that Automattic has revamped their Code Poet website. What used to be a directory of top-notched WordPress developers, is now a resources for anyone who uses WordPress to make websites.

There are loads of tutorials and WordPress how-to out there. Do we really need another? The difference with Code Poet, is that all the resources found here are written, published or recommended by Automatticians. So you can be sure that it’s the best info.

I myself had a lot of fun last night taking the WordPress quiz. I failed to get the Master ranking, but Expert is pretty good. I’ll have to review those questions I missed.

But before that, I’ll be reviewed one of their first eBooks, “Getting Pricing Right“.

Oh and in case you were wondering, yes, it’s all FREE.