Incorporate Cufón in WordPress
Every once in a while comes a project where using a font other than verdana, arial, trebuchet or tahoma would be nice. I recently finished a website for Tod Maffin where, Rob, the designer chose Sansa Condensed as the font of choice for headings. I could have created images for all of the page headings, but I wanted to give Tod the ability to update them if he chose to and more importantly, I also wanted to use the same font for the headings of blog posts. After reading about the alternatives, I decided to give cufón a try and was quite surprised to discover how easy it is.
Here are the steps required to integrate cufón in your wordPress site:
Step 1 – Get cufón
Visit the cufón website and download the YUI-compressed version of cufón. Save this js file in a js folder in your wordPress theme.
Step 2 – Generate your font file
Follow the steps on the Cufón website and add the generated js file to your js folder in your wordPress theme. You’ll be required to upload your font files and thus you need to have purchased them as well as verified that your fonts are legal to use in font embedding. Upload your js folder in your wordPress theme via FTP.
Step 3 – Add the code to your wordPress template
To use cufón, simply add the following lines of code to your header.php file.
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/cufon-yui.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/your_cufon_generated_font_file.js"></script>
<script type="text/javascript">
Cufon.replace('h1');
Cufon.replace('h2');
</script>
These few lines of code will convert all of your h1 and h2 into my selected font. That’s it.
How to use Slimbox plugin to display your portfolio in WordPress
If you’ve been following the Bluelime Media website you will know that we’ve partnered with Barbara from BlueCitrus on many occasions to develop websites and as the saying goes, “The son of the cobbler has no shoes“, the BlueCitrus website was in need of a facelift. My latest teaching gig at Langara provided me with the opportunity to design and develop a WordPress site for Barbara. The goal of the class was to teach the students how to use WordPress to create a portfolio. So building a site for Barbara was the perfect project.
Barbara laid the ground work and designed the header, navigation and gave me a good indication of how she wanted the site to work, but I was given carte blanche on how to make the portfolio work. After looking at numerous portfolio examples, I came across the stunning work of Koldo Barroso. Koldo’s illustrations are simply marvelous and I could look at them all day. His portfolio section is simple, yet very elegant. On closer examination of his site, I noticed that he uses Slimbox to display his gallery pieces which is just a slimmed down version of the original Lightbox.
A few clicks later, I read a few tutorials on how to use Slimbox and decided to use it to build it Barbara’s portfolio section. If you’re familiar with WordPress plugins, you’ll know that beyond how to install and activate, instructions are usually fairly slim when it comes to how to use them. Since I just finished the site and the steps I took are still fresh in my mind, I thought I’d walk you through on how to set your own gallery using the Slimbox Plugin.
Social Media works in mysterious ways
I’ve participated in a few “Ask The Experts” panels in the past few months and couldn’t help but notice that Social Media is quite the hot topic right now. People are very keen in learning how to use Twitter, Facebook, Linkedin, etc… Most attendees are curious about how it works, why anyone would invest the time and energy, what’s the ROI and if it’s the right avenue for their business. These are all good questions and there are simply no easy answer. It really depends on who your audience is and where they are.
A funny thing happened to me last Friday which demonstrates how complicated and unpredictable it is to explain the power of Social Media.
I have a Twitter account and follow mostly designers and WordPress developers. This allows me to find out about latest tips, tutorials and website development news. Cameron Moll posted a tweet to a “mesmerizing” YouTube video which caught my attention. I clicked the link and watched a video taken at Kuroshio Sea which is the 2nd largest aquarium in the world.
The video is indeed breathtaking, but I was curious about the music. I watched and listened to the video a couple of times and wanted to find out who was singing. Using my iPhone, I Shazammed it and got the name of the song, band and album. A quick search on YouTube led me to a video of Barcelona singing live in San Diego. I watched a few more videos and decided to visit Barcelona’s page on MySpace. Listened to a few more clips and then I was off to iTunes and bought the album.
I’m not sure that a marketer could have predicted this, but I’m convinced that Social Media is worth investing in.
Enhance your WordPress site with Custom Fields
Over the years of converting other graphic designer’s design into WordPress templates, I’ve had to think of ways to keep the code simple and easy for clients to maintain the site once live. Working on a few challenging design lately has given me the opportunity to look at using custom fields.
You’ll find custom fields in your admin panel under all post and page text areas. These custom fields allow you to add extra information, technically termed meta-data, and allows you to add jazz up your posts or pages. Here are a few examples of how custom fields can be used:
Fairly Painless WordPress 2.8 upgrades
I had the “privilege” of updating 47 websites today to the new WordPress 2.8 version. All of these sites were updated from version 2.7 or 2.71 so as you can imagine, there were no major issues. While taking care of these updates, I also took a look at all of the plugin upgrades and discovered only three plugins that were slightly problematic.
Following the upgrade and applying the latest patch CForms failed to work properly and the following error popped up:
Fatal error: Cannot redeclare class cf_mail in .../public_html/wp-content/plugins/cforms/lib_email.php on line 3