International Women’s Day
Yesterday I was delighted to chat with Morten Rand-Hendriksen. With a background in philosophy and politics, Morten is a web developer in the WordPress community and interested in looking at gender inequality within the web development field.
Now, I have no idea what other conversations he had on the subject, but I think that Morten was surprised by some of my statements. I’ve been incredibly privileged to have worked in this field for so long and NOT have come across any discrimination. I don’t attend too many conferences and I work from home, so I’m not constantly meeting new people, but whenever I do, I do feel like women are welcomed and treated as equals.
Conferences like An Event Apart and Web Directions always have great women speakers and have always made me feel welcome.
WordCamps are also very well attended by women, and again, I’ve never felt shamed or ridiculed for being a woman.
Perhaps I’m kidding myself, I’m a little bit slow or I’ve just been incredibly lucky, I don’t know…
In addition to having been in this field for a while, I also do yoga on a regular basis. One of the teachings of yoga is to put out in the universe what you want to receive. As a result, I try to be honest, helpful and humble as much as I can and so I think that the universe has introduced me to male developers who are also kind, generous and don’t care about my gender.
To them, I say thank you.
Are mobile devices changing the way we read on the Web?
If you’re a hard core fan of Apple products, you’ve no doubt paid attention to yesterday’s announcement about the iPad 2. I must admit, I do own several Mac products, but I’ve never been first in line to get the new iToy. I did purchase an iPad when they first came out and I do enjoy it, but I won’t buy another until this one breaks. As far as I can tell, the iPad is great for playing games, reading e-Books and… that’s about it.
I still like the tactile feel of paper and so prefer my books the old fashion way, but the iPad has changed the way I read online blog posts and articles.
Instapaper makes this tasks wonderfully pleasing
Instapaper is an online tool, which once you’ve set up a Free account, allows you to save articles to read later. During the day, I’ll bookmark several of these using my Read Later bookmarklet and then in the evening will read them on the iPad. Best of all, Instapaper, strips all of the design, clutter, advertising and displays the article in a large black font making it so much more enjoyable.
I enjoy reading articles this way so much, that I’ve also installed another bookmarklet called Read Now. This bookmarklet also strips all of the clutter and provides you with an easy to read article with large fonts but it displays it in front of you right away instead of saving the article in your account.
What does this mean for typography?
As a designer, you should be aware of the typography limitations on the web. Common browser fonts are still you’re best bet for body text, but much more leeway can be had now with headlines. The Google web fonts api and typekit offers loads of new fonts to play with. These are easy to use and have been tested thoroughly. Typekit’s blog is a great resource to see how others are using various typefaces.
Do keep in mind though, that you no longer have control of your audience. With just a simple click of a button, I can make all of your design disappear and make the fonts bigger. So before spending hundreds of hours researching the right font and debating with your client, do keep in mind that your hard work may not be appreciated.
What about mock-ups?
If you’re concerned about fonts in your mock-ups, Google’s web fonts api allows you to download the font with the added option of contributing a small amount to the font designer. Another great resource for finding web fonts for your mock-ups is at Font Squirrel. All of the fonts are safe to embed in websites.
Just as an aside, if you’re looking for image placeholders, take a look at placekitten. Who will say no to your design mock-ups now?
Fixes to WordPress 3.1 admin bar bug
WordPress 3.1 was released a couple of days ago and along with it the new admin tool bar. Once you’ve upgraded and logged in, you’ll notice it at the top of your site.

The Admin Bar provides quick access to edit or add pages and posts, moderate comments, etc. I spent a good part of the day yesterday upgrading 40+ WordPress sites which I host for clients. These upgrades proved fast and simple and I only encountered two glitches.
Missing Admin Bar
The first glitch encountered was by the absence of the admin bar altogether. I could see a space at the top of the site where the admin should be, but nothing. I posted my conundrum on twitter and got an answer from Andrea_r 3 seconds later.
Checking the theme files, I discovered that in order for the bar to show up, the function <?php wp_footer();?> must be present. Once incorporated, the admin bar showed up.
Messed up Admin Bar
The second glitch took me much longer to figure out. I was also convinced that the error was mine and in my theme and so refused to ask twitter. (Stubborn much?)
Upon upgrade, I noticed that the styling of the admin bar was all messed up. I did the usual testing by deactivating all of the plugins and switching themes. All of these tests pointed to my theme. Originally built in 2005 this bug was the perfect opportunity to go through it anyway and sort this bug out and see what other messy code was in there.
So I proceeded to go through all of the files to see what was causing the glitch. The problem was again found in the footer, but this time the encrypted email I was using was causing the error.
<a href="mailto:info@taku etc...
Removing this bit fixed the issue. Yay!
Display random image in sidebar using Custom Post Types
I recently created a website for Vancouver’s newest Tourist Attraction, the Pink Bus Tour. Later this summer, Vancouver residents will witness the Pink Bus carrying tourists around the city. A big part of the website was to showcase the highlights of the city. These highlights are simply pages within the CMS and my goal was to randomly display a “highlight” in the sidebar.
The highlights in the sidebar were easy to make. They simply consist of an image and a link. The problem was how to pull an image and link at random AND make it easy for the staff at Vancouver Pink Bus to add new images and links once available.
Using a Custom Post Type seemed to be the easiest way to go about this. To create the custom post type, I added the following to my functions.php file:
// Custom Highlight in sidebar
add_action('init', 'create_highlight');
function create_highlight() {
$highlight_args = array(
'labels' => array(
'name' => __( 'Highlights' ),
'singular_name' => __( 'Highlight' ),
'add_new' => __( 'Add New Item' ),
'add_new_item' => __( 'Add New Highlight Item' ),
'edit_item' => __( 'Edit Highlight Item' ),
'new_item' => __( 'Add New Highlight Item' ),
'view_item' => __( 'View Item' ),
'search_items' => __( 'Search Highlight' ),
'not_found' => __( 'No highlight items found' ),
'not_found_in_trash' => __( 'No highlight items found in trash' )
),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => true,
'menu_position' => 20,
'supports' => array('title', 'editor')
);
register_post_type('highlight',$highlight_args);
}
add_filter("manage_edit-highlight_columns", "highlight_edit_columns");
add_action("manage_posts_custom_column", "highlight_columns_display");
function highlight_edit_columns($highlight_columns){
$highlight_columns = array(
"cb" => "<input type=\"checkbox\" />",
"title" => "Title",
);
return $highlight_columns;
}
function highlight_columns_display($highlight_columns){
switch ($highlight_columns)
{
case "description":
the_excerpt();
break;
}
}
Once this code in place, the highlights were ready to be populated. Now when a new sidebar image is needed, the folks at Vancouver Pink Bus simply upload a new polaroid image, link it to the page (made so much easier now WordPress 3.1 internal linking feature) and that’s it.
The final step is to display, at random, one of these custom post types. This was done by adding the following to my sidebar:
<h3>Highlights Include</h3>
<?php
$loop = new WP_Query(array(
'post_type' => 'highlight',
'posts_per_page' => 1,
'orderby'=>'rand'
));
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
To find out more about Custom Post Types, I highly recommend Justin’s post and Devin’s Portfolio Theme. With both this tutorial and theme, you’ll be on your way to creating multiple Custom Post Types.
The difference between WordPress .COM & .ORG
I was recently asked by a colleague to explain the difference between .com and .org. With two WordPress websites to choose from, it can be a bit confusing sometimes.
WordPress.com is a hosted solution provided to you by the same folks who work on WordPress.org. This hosted solution is a great solution for anyone just wanting something simple, easy to use and ready in 5 minutes. Once signed up (for Free) you choose your theme and start blogging. With WordPress.com, everything is taken care of for you. Hosting, server and database set up, spam, backups, upgrades… Everything!
The drawbacks of this option is that you can only choose one of their available themes. Thus the selection is limited and customization is NOT possible. Neither is installing plugins.
WordPress.org is the self hosted solution. To set up a website using WordPress.org, you’ll need to visit the site, download all of the files and install them and the database on your hosting provider. Once you have everything installed, you can customize and install plugins to your hearts content. Anything is possible with WordPress.org, but it requires skills to set up and you’ll need to take care of backups, upgrade, spam, hosting… Everything!
Both options and Free and great, but will depend on your needs.
Matt Clark from tweetpages.com made this great video explaining the difference using the restaurant analogy. It’s worth a listen.
Setting up WordPress for development
If you’re like me, chances are, you won’t be building and launching a site in a day. Websites take time to set up, design, populate with content and test. As a web designers you will probably have clients who fall in one of these situations.
- The client has a site, but requires a new one;
- The client has nothing and needs a site.
Regardless of the situation, it’s best to develop the site in a folder that’s hidden from view. I usually like to develop my site in a wp folder. When people navigate to the site I’m working on they will see the current site or a Coming Soon page at www.domainname.com and the WordPress site in development will be at www.domainname.com/wp.
Another good thing to do while you are developing a site, is to set Privacy Settings to the second option “I would like to block search engines, but allow normal visitors“.
When you are ready to launch, giving WordPress its own directory takes only a few minutes.
- Navigate to Settings > General in your admin. Change the Site url from www.domainname.com/wp to www.domainname.com. DO NOT TOUCH WordPress url. Hit Save.
- In your FTP, navigate to your wp folder and download the
.htaccessandindex.phpfiles. (Uploading them to your desktop is fine. You won’t need to keep these once you are done.) - Open the index.php in your text editor and change the line that says:
require('./wp-blog-header.php');
to
require('./wp/wp-blog-header.php'); - Save the file.
- Delete the old site from your root folder (making a back up might be a good idea) or the Coming Soon page.
- Upload this revised
index.phpand the.htaccessfiles to your root folder.
That’s it. You should now be able to see the site at www.domainname.com and access the WordPress admin at www.domainname.com/wp.
Don’t forget to change the privacy settings back to the first option, allowing Search engine to find your site.
These instructions are also found in the codex.
Adding pagination to your blog
Most WordPress themes come bundled up with “next page” and “previous page” links allowing you to navigate from older posts or newer posts. (The number of posts displayed on your blog overview and archives can be set in the Settings > Reading section of your admin.)
These links are great, but they can be improved by pagination which clearly indicates how many pages there are. As always there are many WordPress plugins for this, but there’s really no need. I personally prefer to keep plugins to a minimal and thus found the following tutorials very useful.
Kreisi’s tutorial provides you with all of the code that you need to add pagination to your site. Once you’ve read his detailed information take a look at Veron’s post at Sparklette Studio. She made a few modifications and enhancements to the code.
Removing ellipses from WordPress excerpts
WordPress allows you to display either the full content or excerpts of your posts.
When creating a template for search results, I do find that displaying excerpts rather than a full post improves usability. However if you simply use the excerpt function, you’ll notice that ellipses [...] are added at the end.
Personally I don’t find these useful at all and would prefer to have a link.
An easy way to fix this is by inserting the following code in your functions file:
function custom_excerpt_more($more) {
return '<br /><a href="'. get_permalink() .'">read more</a>';
}
add_filter('excerpt_more', 'custom_excerpt_more');
This will insert a break tag and add a link to the rest of the post.
You can also control the length of your excerpts if you wish. Simply add the following to your functions file.
function custom_excerpt_length($length) {
return 20;
}
add_filter('excerpt_length', 'custom_excerpt_length');
This function will limit your excerpts to the first 20 words.
Be careful though, if your post is less than 20 words, then the link won’t appear.
Hosting requirements for WordPress
The main advantage of using WordPress as a Content Management System (CMS) is the ability to make your own website edits. Gone are the days of finding a typo on your site and not being able to do anything about it. However a website powered by a CMS isn’t the same as a static website. In fact a site that is powered by a CMS is called dynamic, not static.
When making changes to a static site, you’re web developer modifies the code of each HTML page. Changes on a WordPress site are done by modifying the content which is stored in a database. The WordPress templates, coded using PHP, then pulls the content dynamically from the database and displays the webpage.
Thus when planning your WordPress, you’ll need to make sure that your hosting provider offers the following:
- PHP version 4.3 or greater
- MySQL version 5 or greater
Any server that runs PHP and MySQL will do, but an Apache server is the most robust and has the most features for running a WordPress site. Some hosting provider will tell you that Microsoft based servers are perfectly fine, but please don’t listen to them. The set up is quite difficult and no fun at all.
Having installed hundreds of WordPress sites, I am happy to recommend the following hosting providers.
These hosting providers all have very good WordPress support and great customer service.
Once you’ve set up your hosting, you’ll need to provide your web developer with the following:
- Access to your hosting provider control panel - This is needed to set up the database
- FTP access – This is needed to install the files on your server
Setting up a WordPress site is a bit more complicated than a static one, but with WordPress’s popularity, more and more hosting providers and making the necessary changes to offer full WordPress support.
Domain name and web hosting, what’s the difference?
When setting up your first website it’s not uncommon to get confused between domain name registration and web hosting.
Your domain name is the name of your site or your url (www.mynewcompany.com) and can be purchased by going to a domain name registrar. Domain names usually range from about $10 to $50/year depending on the extension. (.ca are more expensive than .com.)