Giraffe Theme


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



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 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="">First choice</a></li>
<li><a href="">Second choice</a></li>

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 thoughts on “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.


  3. Best theme.

    There is (in v1.10) a small problem in the function giraffe_latest_comments: the comments classifies as Spam are visible.

    P.S. there are few simple problem of validation W3 (tag alt ecc ecc)

    Excuse for my English.

  4. You are correct raDIO, I didn’t check the spam field. The theme has been updated to ignore spam, and some validation warnings corrected.

  5. My error:

    Fatal error: Call to undefined function: mysql_real_escape_string() in /wp-content/plugins/giraffe/giraffe.php on line 185

    Point me in the right direction?

  6. Fatal error: Call to undefined function: giraffe_have_lead() in /mnt/web_f/d36/s13/b024fd4b/www/wordpress/wp-content/themes/giraffe/index.php on line 7

    Just installed v1.12.

  7. I figured out the undefined function: giraffe_have_lead(), deleting and re-installing the plugin fixed it. I did try this the first time, but something must not have gone right, or there is a particular order required for a proper upgrade. Anyway all is well again, still lov’in the theme. Now if only I can gets some decent content going so I can get some commenting.

  8. John, I am a newbie. I installed your themes, very nice and when I try to update options it give me this message : “Problem updating files – is the theme directory write-enabled?”. Everything run on Mac os X, I check the permissions of the themes directory and it is read and write for user and group …. What is it that I am not seeing?

  9. There must still be some permissions problem. When you press ‘Update options’ it tries to overwrite the current style.css and index.php – both of these must have write permissions too.

  10. The theme is perfect I have been looking for GUI theme editor for a while, Thank!! Question, how would I add the sidebar “pages” above Archives, I feel that is key to my website. Please be detailed I am very bad at editing PhP.

  11. Edit /wp-content/themes/giraffe/sidebar.php and add the following line before the Archives:

    <?php wp_list_pages('title_li=<h2>Pages</h2>&depth=1');?>

    So you should have something looking like:

    <?php wp_list_pages('title_li=<h2>Pages</h2>&depth=1');?>
    <li><h2><?php _ge('Archives')?></h2>
    <?php wp_get_archives('type=monthly'); ?>

  12. trying to install the plugin because I’d love to be able to configure this theme, and for the life of me, I CAN NOT get the plugin running properly.

    I keep getting this error:

    Fatal error: Call to undefined function: load_theme_textdomain() in /home/.salazar/kcausin/ on line 11

  13. Hi Keith, what version of WordPress are you using? I haven’t checked, but I believe the theme will only work on version 1.5+. Look in the /wp-includes directory for the file ‘wp-l10n.php’ – this WordPress file should contain the function that is causing an error.

  14. I have just installed the giraffe theme for my daughter, but I seem to not to be able to get past these two issues.
    Started looking at code but was unable to figure out the issue.
    ERRORS are:
    Warning: main(giraffe.php): failed to open stream: No such file or directory in /home/.sites/28/site188/.users/100/cristina/web/wp-content/themes/giraffe/header.php on line 1

    Warning: main(): Failed opening ‘giraffe.php’ for inclusion (include_path=”) in /home/.sites/28/site188/.users/100/cristina/web/wp-content/themes/giraffe/header.php on line 1

    Things I have checked.
    – another user can read file
    – permissions
    – downloaded the theme again
    I am not sure if you have a quick fix or can point me in the right direction.
    Daughter would love to have the theme.
    Thanks in advance.

  15. If I try and access the giraffe.php file directly on your website I get the same error message that Keith reported a few days ago here. What version of WordPress are you using?

  16. John I have the newest version of WordPress version 1.5.2.
    Otherwise I am lost on where to go from here.
    I disabled the plugin as well which did not improve or change the error.

  17. Thanks John for the info.
    I have removed the older version of the giraffe theme and plugin and installed the newer version.
    The results funny enough were exactly the same meaning the error stayed consistant.
    I was tried to find an older version of your theme on the web just to verify if the theme is the issue or WordPress.
    I mean you never know it could be someone elses issue and not yours.

  18. Hi John,

    The only question I have is about getting the trackbacks to show like you have here. It seems that the download version doesn’t have that feature. Am I missing something?

  19. Comprehensive list of 325 WordPress 1.5 Themes / Templates available for download

    Constantly growing list of over 300 wordpress 1.5 themes, including numerous 3-column template layouts

  20. I tried running the plugin in my blog and it gave me an error about function _g() being undefined. I’m running a stock WP 1.5.2, no mods, just some themes I’ve uploaded. After jiggling some stuff around I’m able to activate the plugin w/o errors, but I don’t see any effect so I think it’s not really active. Where is the admin UI for the theme supposed to be?

  21. Michael, sorry to take so long to respond. I’m stumped as to why you are receiving the error. I took a fresh copy of the latest WordPress, installed it on my computer along with the Giraffe theme, and everything worked fine. It’s possible that your host has some strange configuration problem. Could you type this into a file:

    <?php phpinfo () ?>

    Put it on your website, and send me the link. It will tell me what PHP configuration you have so I can try and see where the error is.

    Also, try disabling all plugins and see if that has any effect.

  22. Joshua: The admin UI is in the ‘Options’ menu, just underneath in the submenu. The latest version 1.18 should have fixed the _g() undefined error.

  23. David: The version for download is the same version I use! Double-check your WordPress configuration to make sure you’ve not disabled trackbacks

  24. Fatal error: Call to undefined function: get_the_category_list() in /home/dctheatr/public_html/reviews/wp-content/themes/giraffe/index.php on line 7

    Any ideas?

  25. John thanks for not forgetting us.
    Since I last posted the theme has been downloaded again and uploaded again. As you can see by the original link the results are the same.
    All plugin’s have been disabled which did not help.
    I have included the php info link which might be helpful.
    Thanks again for the help.

  26. Gettingthere…

    Get this when trying to update from options plugin
    Problem updating files – is the theme directory write-enabled? (It is)

    Get this on all posts
    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
    SELECT category_nicename FROM wp_categories WHERE cat_ID=

  27. Well I have figured a little out 🙂
    Thanks John for the patience

    I started another fresh WP install

    When I activate permalink I get the error:
    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]

    Only using permalink!

    I get the “write-enabled” error using my current blog or the new test one.. when trying to use the plug-in. The folders are write enabled though

  28. John

    When the update is processed does the code point to a particular blog structure or or is it written in such a way that the actual structure (where wordpress is installed) does not matter. I still get errors when using permalink or the plugin although everything else is fine.

  29. So this seems to be all related and here we go.

    After activating permalinks (which works) this error pops up at each page though the page loads fine:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
    SELECT category_nicename FROM wp_categories WHERE cat_ID=

    Also when clicking “Uncategorized” at:
    Posted on September 10th, 2005 in Uncategorized. 1 comment.
    I get a “404” page not found

    I still get an error when trying to update the style using the plugin that tells me the theme folder may not be writeable but is not the case. This is not of real importance to be as I like the theme as is but may be related to the above.

    If anyone has any ideas on these issues please let me know. It’s driving me nutz!

    Thanks in advance.

  30. Hi Ronnie. The write permissions error may be caused by a very security-consious host. Try setting the write permissions for both the directory and all the files inside it.

    Do permalinks work for you with another theme? The function that is causing the error you described is not directly called by the Giraffe theme. Permalinks often cause problems on hosts where there are write-permission problems or the .htaccess URL rewriting is not working properly. If you disable permalinks and everything works fine then check the permissions on the .htaccess file.

  31. The problem was a result of the differing configurations of PHP that web hosts install. Your particular host doesn’t seem to have set the search path, which is what tells PHP where to find files. As such the header file couldn’t find the giraffe.php file, even though it was in the same directory. I changed it so that it specifically looked in the same directory.

  32. Actually permalinks works fine on my present theme. Only when I turn them on with Girraffe do I get the error. I have the theme installed in a test directory and have actually tried making every theme file and folder writeable. Same with .htaccess

    Oh well…

  33. Very nice theme, I really like the plugin controls! SO far I have mode one addition which is to change the_content to the_exceprt in the index. I figured out I had to change in the plugin or it would get overwritten with changes.

    I woud lliek ot make a request for a future version. In the control, please offer options for date formatting. I just noticed that the site says “Older posts: 12/05/2005.” I assume this is European formatting because we haven’t written any posts in December 2005 yet!

    I can change this myself in the template, but the users I setting this up for can’t. This would be very simple to add to the theme options page.

    Thanks again. This is great work!

  34. I’m pretty new at this stuff, kept on getting errors when i try to change the options in the giraffe theme. how do i make thetheme directory and file writeable? also, can I change the bar at the top? without th giraffe?

  35. Install the Giraffe plugin (at the top of this page) and you will have an extra menu in the WordPress administration screen. From there you can change the colour scheme.

  36. Hey John, Sweet theme man…its sexy and perfect for what I need. BUT, its generating an error that I cant seem to figure out.

    Warning: Failed opening ‘giraffe.php’ for inclusion (include_path=”) in /home/sites/site18/users/sb.neil/web/wp-content/themes/giraffe/header.php on line 1

    I’ve installed WP with various themes a number of times before without problem (although never on this server)
    Server: PHP Version 4.1.2 | Apache

    Also not sure if its relevant but I’ve changed all the CHMOD permissions on those files mentioned in the install instructions to make them all writable, i.e.- 666…

  37. Hi John,

    I love the theme editing plugin. I love it better when I can get it to work. Here’s the error I am getting “Problem updating files – is the theme directory write-enabled?” I have given read write permission to everything on the server. Hummmm.

    I am hoping you can help!

  38. Andrea: Somewhere there has to be a file or directory with incorrect permissions. Some web hosts can require the permissions to be given to ‘group’ or ‘other’, not just the user. Try setting the permissions in the giraffe directory to 777

  39. Neil0r: Are you using the latest version of the theme? This problem has been mentioned before in the comments here, and I should have fixed it in version 1.19

  40. Kosh2: I’m not sure why, but the HTML for your page has <id=" page">, when it should be <id="page"> – notice the extra space. So what is happening is that the browser cannot match the style for the page to the item in the HTML.

    Quite why this space has appeared I don’t know. It’s not in the theme itself, so maybe it was introduced when transferring over FTP. Either way you can fix it by removing the space from header.php yourself, or re-downloading the theme and transferring header.php over your existing file.

  41. many thanks, that did the trick. I doubt I would have ever found that. Now I will settle back and read your themes guide which I have now bought 🙂

  42. is there any way to add a link to thetop navigation bar. I want to add in the link to my gallery2 along with the pages links but can’t figure out how.

  43. How are you implementing switching between localized versions of the theme on the fly? I’d basically like to provide the localization menu you have here. Any way you could add this as an option to your plugin script? (Apologies if it’s somehow in there already and I’ve missed it…)

  44. Kosh: Unless you configure it otherwise, the links in the top menu are WordPress pages. If you want to add a new link you can just create a new WordPress page and insert the relevant details there.

  45. Ann: Google does indeed see and know all. The localization menu is going into the next version of the theme anyway (although don’t let Google know just yet), probably with a bit more customisation options.

  46. Arbeiten an neuem Theme und Übersetzungen

    schon vor einiger Zeit habe ich für jemanden ein individuelles WordPress-Theme erstellt. Ein recht simpel strukturiertes Äußeres, klassisch, extrem breit, ohne Schnörkel und visuellen Klickibunti-Effekten.
    Da bei mir…

  47. hspace and vspace are deprecated HTML attributes and may not be supported properly. You can achieve the same effect with CSS padding.

  48. Dear John, I really like your template and I would like to use it for my blog site but I have a big problem with your plugin. I followed your instructions to install it, I use the last version of wordpress I saw also the wp-l10n.php in wp-includes and it includes the function: Fatal error: Call to undefined function: load_theme_textdomain() in ….wordpress\wp-admin\giraffe\giraffe.php on line 11 . I just unzipped the giraffe-plugin file in wp-admin because after I active the plugin on my panel control and I go to option – giraffe theme the screen show me another error because it doesn’t exist the file giraffe.php on wp-admin/giraffe.. so I installed also there the plugin but on line 11…crack.
    Can you help me ? OSrry for my english but I’m Italian and I’m not so practice to write in english.

  49. hey, I just get
    “The requested URL /wp-admin/giraffe/giraffe.php was not found on this server.” when I try to access the giraffe-plugin options settings, probably because I did not copy any files into teh “wp-admin”- section (neither theme-files nor plugin-files).

    is this just me or is it a bug ?

    cheers, Grinch

  50. John,

    Your Giraffe theme is beyond excellent, thank you for making it available to us.

    I have 1.19 on my site, edited to my liking, and was wondering if this new version (1.20) had any major chages?

    I looked at the new php files (didn’t install) and I saw new options for a random logo, locale switcher and a few layoutX.png files. What are the changes John?


  51. Most of the changes are in the admin interface. A full list can be found here. If you want to give it a try you can make a copy of your existing giraffe directory, just in case the new theme changes your modifications!

  52. I plainly copied your example for editing the top navigation bar, but nothing happened. Is there a tiny typo, or is something else than refreshing the page required?

  53. […] Hey, hey I am being linked by another blog – Mental Nurse. many thanks to him for that. I will survey his site at leisure later. Looking at his site reminds me that I must improve my site layout. I do like the giraffe theme but at the same time it does not quite spell nurse. I need the fluidity of giraffe coupled with the edginess of mental Nurse’s theme. […]

  54. Not as far as I can tell. I copied the code directly from this webpage and put it in wp-content/themes/giraffe/giraffe_functions.php. I then refreshed the page and the navigation bar contained the two choices in the code.

  55. Blimey. It works. Soory foo beein stoopid. Come to think of it, there is one possible source of error: I used the WordPress editor (chmod set to 666 for the functions file), but it didn’t seem to update after editing. But this one works, though. Thanks!

  56. i selected the show calendar option, but it is not showing.

    also, installed as instructed, but won’t switch back to english. have the line in wp-config.php as: define (‘WPLANG’, ‘ja’);

  57. Small bug in the code prevented the calendar being displayed – try version 1.22. To revert back to English change the wp-config.php line to be: define ('WPLANG', '');

  58. I suggest you to change the query in giraffe_comments() from

    $comments = $wpdb->get_row (“SELECT count(comment_author) FROM $wpdb->comments WHERE comment_approved=1”, ARRAY_N);


    $comments = $wpdb->get_row (“SELECT count(comment_author) FROM $wpdb->comments WHERE comment_approved=’1′”, ARRAY_N);

    that is to quote the number 1.

    In my local site I use mysql 5.0 and the original query return always 0.


  59. […] Giraffe Theme是我目前知道第一個可以由WP 管理介面做版面變動的Theme,所以你可以快速的切換Theme的顏色與樣式,其是利用Graffe Theme Plugin在Plugin目錄儲存基本主要的範本,在你做變動後將檔案存入你theme的目錄之內,做為快速切換的技術。所以剛開始怎不管再怎麼改CSS檔,在變動後就會還原為原本的樣子,還以為我眼花了或Cache的問題。其實作者的另一個作品更有名InScript, Blogging Pro China介紹說今年最有創意的plugin。 […]

  60. When I click a category view I have the following error:

    Fatal error: Only variables can be passed by reference in /home/user/ on line 629

  61. I changed the line 629 of /wp-includes/classes.php from:

    $category = &get_category($this->get(‘cat’));


    $tmp = $this->get(‘cat’);
    $category = &get_category($tmp);

    and now works. I had the same problem with other things (for example the wp gettext wrapper for internationalization) and I suspect this is a php 5.x issue.


  62. […] Giraffe: décidément, les noms d’animaux semblent avoir du succès auprès des auteurs de thèmes WP… Quoi qu’il en soit, Giraffe est la création de John Godley. Ce thème est déjà plutôt “vieillot” (il remonte, sauf erreur, à la v1.2 de WP), mais a encore de beaux restes… On peut dire qu’il dépasse d’une tête (et d’un long cou!) pas mal de thèmes plus récents! […]

  63. This theme seems interesting, as there are not too many fluid themes for WordPress. Thanks for your work!

    However, I have a problem. Having copied the giraffe directory into the plugins directory the WP administration environment of mine stops working. I.e. whichever administration page (or even the main blog page) I try to acces, all I get is an empty white page (I have tried several browsers).

    When I then remove the giraffe directory from the plugins, everything works well, except for the plugin, of course.

    This happens with the newest version 1.2.3 and a fairly new version of WP (1.5.2).

  64. Giraffe seems to work nicely under WP 2.0 too, which is good news.

    One thing I’ve added to my copy is a Next Post/Previous Post link on the single.php page so that users can easily navigate through posts chronologically. There may be another way of doing it but I couldn’t see anything obvious.

  65. Hey John, thanks for your wonderful theme and plugin. I think in the customization plugin, you should include page (as in the “write static page option”) customization. Thanks again…

  66. Very nice theme. Possible bug though: the “Show icon for external links” option doesn’t seem to do anything; the links get icons whatever I set this to. I am using WordPress 2.0.

  67. I’ll be releasing a new version soon which will fix some of the small bugs as well as being fully 2.0 compatible (it currently works fine, but the theme is doing a lot of work that 2.0 itself can do).

    Ughly: You need to change the blog address from the WordPress administration screens (under Options)

Leave a Reply

Your email address will not be published. Required fields are marked *