Archive for the 'WordPress' Category

Chris Coyier’s Blank WordPress Theme

In case you missed it, a few weeks ago, Chris Coyer, one of the authors of “Digging into WordPress“, released his blank theme. In his article he states the following:

I have a “blank” WordPress theme for myself, because I make a lot of WordPress themes. Starting from Kubrick, or any other pre-made theme, would be absurd. There is to much stuff there that would have to be stripped out or fought against to be useful. So, I have my own.

Music to my ears. When I started using WordPress years ago, I couldn’t get my head around Kubrick. Cleaning the code took way too much time and energy. I originally created my themes for a WordPress class. In order to teach students how to theme a site in 6 weeks, I needed something clean and void of excess stuff so I set up my basic theme.

I was thus curious when I read Chris’s article and downloaded his theme. It’s super clean and to my delight it’s not so different from mine. I have a lot more CSS than he does and he’s got some fancy stuff going on in his header.php, but overall I would highly recommend it. Starting from a clean theme to design a WordPress site is the best way to work. If you haven’t had a chance to try a blank theme, you should check it out.

Create a sidebar menu using the Simple Section Navigation Plugin

One of the best feature of WordPress is its ability to be used as a powerful CMS. However, since WordPress is a blogging platform and not a true CMS, there are a few drawbacks, especially when building sites with deep navigation levels.

I was recently asked by a colleague to help develop a very large site for a Vancouver organization. The site wasn’t very complicated, but contained several dozens of pages four levels deep. The first levels were displayed as a top horizontal navigation bar, while the others appear in the sidebar depending on which page you are on.

Listing pages can easily by done by using the built in wp_list_pages() function, but this function lists all of the pages, regardless of where you are on the site. This function is ideal if you’re creating a sitemap, but not that useful for a side navigation.

As mentioned in an earlier post, the fold page list plugin can be used to generate a stylish side menu, but this still leaves us with no control as to what is displayed on what page.

For example, when one navigates to the About pages,it would be nice to view the pages which are children of about, while on the services, the children of services are displayed.

This can be achieved by using the simple section navigation plugin created by C Murray Consulting. Simply download and activate the plugin as you would any other and add this line of code to your sidebar:

<?php simple_section_nav("<h2>","</h2>") ?>

You can view this plugin in action by visiting the brochure I demo site.

Creating a custom page template in WordPress

While designing your WordPress site, you may want to create a page that’s different from your other pages and posts. I’ve created many websites which have a custom home page, portfolio section,  site map etc… WordPress allows you to create custom templates in a few simple steps:

  1. Open up your page.php or index.php and add the following code at the very top of your page:
    <?php
    /*
    Template Name: Name of your Template
    */
    ?>
  2. Save your your file as new-template-name.php (you may want to use portfolio.php, sitemap.php, etc..)
  3. Upload your file in your themes directory
  4. In your WordPress admin, edit the page that you want custom and select the newly created template from your “Template” drop down which is found under “Attibutes”

That’s all it takes to create the template, but now you will need to customize it to make it look different from your other pages. You may want to have a different background, dimension, etc…

continue reading »

Display a link to your RSS feed in address bar

I was scanning the WordPress Support Forum the other day and someone asked how one could display an RSS feed icon in the address bar just like in the image below:

rss feed icon in address bar

I must confess I’d never noticed this before and of course now I can see it on most websites, so I’ve updated the basic and 3 column templates to include this feature. And you can too simply by replacing the RSS feed code in the header.php from:

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />

to:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

That simple change is all it takes!

Framework Templates revised following WP 2.8 release

Following the much anticipated release of WordPress version 2.8, I read up about deprecated functions from past WordPress releases and realized that my templates contained a few that needed updated.

wp_get_links() is now a deprecated function and was replaced by wp_list_bookmarks()

wp_list_cats() is also deprecated and has been replaced by wp_list_categories()

These functions can be found in the sidebar.php of the 3-column and basic themes and the sidebar-custom.php of the 3-column theme. No changes are needed in any of the other templates.

Additionally, while doing research about the best way to write the search function, I came across this post which explained that both action="<?php echo $_SERVER['PHP_SELF']; ?>" and  action="<?php bloginfo('siteurl'); ?>" are correct and will provide search results. But the second method is the one to use if you choose to have your blog in a directory other than the root.  Since the second method one also works if your blog is in the root folder, I thought it would be safer and less confusing to simply replace that bit of code.

3 Column Fixed Width Blog Template

3 column templateWe’ve just released our latest framework template allowing you to build a 3 column blog with both left and right sidebar widget enabled. This template framework does not require any plugin and like all our previous templates, the code is clean and simple.

You can check out the demo here or download it.

If you have a chance to play around with any of our templates and create a blog or website, please let us know. We’ll feature your work on our blog.

Release of version 2.0 of Framework Templates

I would like to thank everyone who’s had a chance to play with the templates so far and sent me feedback. I’ve recently made a few changes and fixed a couple of errors.

I also added a style for the image caption. When WordPress version 2.7 was released, the caption was a new feature that was most welcomed. When you use the caption on a photo or image, WordPress adds a class called .wp-caption. Styling this class is super easy and so I’ve added it to the templates and you can modify it to suit your design.

If you’ve already downloaded the templates, you might want to get a fresh copy.

20 WordPress theme Frameworks

Over at 1st Web Designer, Dainis Graveris, has put together a great list of resources that will help you get started if you are looking at building a WordPress site from scratch.

Introducing Framework Templates for Web Developers

Building websites using WordPress as a Content Management Solution is proving to be more and more popular. WordPress is easy to customize by web developers and easy to use by people who do not want to learn HTML. The WordPress community is also very creative and generous. Many templates have been provided and are listed free of charge on the WordPress website.

As a web designer, I’ve never been entirely satisfied with these themes. I usually start with a theme from a previous project or from my collection and then spend quite a bit of time adjusting the CSS, removing the images and cleaning out the WordPress php files.

I’ve been meaning to create templates that could act as the framework of my sites and thought I would give back to the community. These “themes” consist of WordPress templates that have been stripped down of excessive coding, images and crazy scripts. They provide you with a clean framework which you can use to build your own theme.

I hope that these prove useful and would love to hear your thoughts.