Giraffe Theme

download

Download: giraffe.zip
Supports: WordPress 1.5

This is a fluid-width theme that attempts to split the front page of a blog into three sections:

  • Lead posts. The latest posts, with full-width and a large font
  • Recent posts. Slightly older, with shorter width, smaller font
  • Older posts. Everything else, displaying just the titles

blueredgreen

Localization

The theme is fully localized. This means it can be translated into other languages without having to modify and hack the theme to bits. The list of available translations is:

To install a translation, download the .MO file and upload it to the theme directory. You should ensure that the setting of the WPLANG value in the wp-config.php file matches the translation.

The theme contains a .PO so anyone can translate the words using a tool such as poEdit. I would greatly appreciate if any translations could be sent to me so that I can include them here for everyone else.

Support Plugin

adminThe theme has a support plugin that provides an administration interface and the capability to configure the theme:

  • Change colour scheme
  • Change font and font size
  • Change whether to have a full-width lead post, or more traditional two-column layout
  • Change page dimensions
  • Configure number of lead posts, recent posts, random posts, and latest comments
  • Switch logo on or off
  • Compress CSS by reducing unnecessary comments, spaces, and returns. Shrinks the file by about 2K – not a lot, but every little helps.

This plugin is optional and the theme will work without it, although obviously you miss out on any configuration. Note that if you want Gravatars displayed then you will need to install the separate Gravatar plugin.

Installation

Installation of the theme is just like any other theme:

  1. Download
  2. Unzip
  3. Upload the ‘giraffe’ directory to your /wp-content/themes/ directory
  4. Enable the theme from the administration screen

You must make the theme directory and the files style.css, index.php, single.php, and page.php writeable. If you do not, you will receive an error in the admin interface when updating any details.

Installation of the plugin is also just like any other plugin:

  1. Download
  2. Unzip
  3. Upload the ‘giraffe’ directory to your /wp-content/plugins/ directory
  4. Enable the plguin from the administration screen

Please delete any pre-1.3 Giraffe plugin.

You can change the logo by either disabling it from the administration plugin, or by uploading a new image called ‘logo.png’ or ‘logo.gif’ to the theme directory. The theme will serve a PNG to all non-IE browsers, and a GIF to IE. You can use fancy alpha-blending with the PNG, yet still keep a decent image for IE users.

Modifying the top navigation menu

By default the Giraffe theme will display a list of WordPress pages in the top navigation menu (the bar just below the logo). This means that to modify entries in this menu all you need to do is to change your WordPress pages.

If you want to customize the list further, or you want to create your own list, then you can do so by editing giraffe_functions.php in the theme directory and adding a function:

function giraffe_top_menu () {
... your code
}

The function should output the menu as a series of HTML list elements <li>…</li>. For example, if you want to directly enter the menu:

function giraffe_top_menu () { ?>
<li><a href="something.com">First choice</a></li>
<li><a href="anotherthing.com">Second choice</a></li>
<?php
}

Other details

To get Gravatars working you will need to download and install the WordPress Gravatar plugin.

The number of ‘older posts’ is determined by the WordPress configuration option ‘Options/Reading/Blog/Show at most’ and the Giraffe options ‘Number of lead posts’ and ‘Number of recent posts’. If you have WordPress configured to display 10 posts, and the Giraffe theme configured to display 1 lead and 3 recent posts, then the number of older posts will be 6.

145 Responses to Giraffe Theme

  1. Thanks for the review Angsuman. Some good suggestions there, and I’ve included them in a new version.

    I’ve had to keep the plugin as it’s necessary for the admin interface, but now it’s optional and only contains the code for the interface itself (the rest is in the theme).

    (incidently, I tried posting this on your website but just get a blank screen when I submit)

  2. Nice theme.

    There are (in v1.9) however still two hardcoded references to the wp_posts table in giraffe.php, which need to be changed to $wpdb->posts.

    This is in function giraffe_random_posts.

    Colin