The Unstandard theme: widgetized and gravatar-ized

The minute I came across the unstandard theme I knew it was the perfect theme for what I had in mind for Aytemir.com.

However I found out that it lacked a bunch of essentials features, which I missed dearly. And although there are some snippets in the comments and the forum they’re just not complete or they didn’t work for me: hence The Unstandard theme version 2, which adds the following extra’s on the already excellent theme:
-Text replaced with a logo
-Sidebar widgetized, with correct CSS layout
-Footer widgetized, with correct CSS layout
-Gravatar in comments

Live demo: You’re looking at!
Download: The Unstandard theme version 2.0!

Note: all copyrights, licence and credits concerning both versions are still a property of Derek Punsalan/5thirtyone.com.
The Unstandard v2.0 theme is distributed as is: You’re advised to install and test it locally (with XAMPP or WAMP) first and backup your originals.

It’ll probably work ‘out of the box’: I’m using it locally and live with Wordpress version 2.6.2. Please leave a comment if you’re having troubles with it.

UPDATE: Manually upgrade

If you’re already using the original Unstandard theme and you’ve already hacked it a bit than you might consider following these steps to ‘upgrade’ it manually to version 2.0:

1.Gravatarize

Somewhere around line 32 in comments.php after

<div class="fix">
				<div class="author_meta">

add the following

<?php if(function_exists('get_avatar')) { echo get_avatar($comment, '75','http://www.aytemir.com/wp-content/themes/unstandard/images/default_avatar.png'); } ?>
<br/>

BONUS: the last parameter is not required. It only replaces the default Wordpress avatar (mystery man) with your own default avatar!
BONUS: you might also consider reversing the comment order by displaying the last post at the top. Just add the following

<?php foreach (array_reverse($comments) as $comment) : ?>

just after this line

<ol class="commentslist">

2a.Widgetize sidebar

First copy functions.php to your themes root: copy this file from the above zip-package!
And in your sidebar.php add the following code, where you want your sidebar widget to appear

<ul class="sidebar-ul">
  <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
  <?php endif; ?>
</ul>

2b.Widgetize footer

Edit your footer.php and add the following code, where you want your footer widgets to appear (in my case/Aytermir.com right at the top)

<ul class="sidebar-ul">
<div id="subfooter">

<div class="widget"><div class="inner">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("subfooterleft") ) : ?>
<?php endif; ?>
</div></div>

<div class="widget"><div class="inner">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("subfootercenter") ) : ?>
<?php endif; ?>
</div></div>

<div class="widget"><div class="inner">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("subfooterright") ) : ?>
<?php endif; ?>
</div></div>

</div>
</ul>

And adjust the CSS style.css by adding the following at the bottom

/* highlight author comments*/
.authcomment {
background-color: #B3FFCC !important;
}

/* widgetizing the footer */
#subfooter {
width:960px;
margin-left:0px;
margin-right:0px;
height:300px;
clear:both;
}

#subfooter .widget {
width:310px;
float:left;
margin-left:0px;
margin-right:10px;
}

#subfooter .widget .inner {
padding:0px;
}

BONUS: the first part will highlight the author comments!

3.Logo instead of title text

While your busy why not replace the title of your blog with a cool logo Don’t forget to replace my URL’s with your own! Just edit your header.php

<a href="http://www.uppedd.com"><img src="http://uppedd.com/wp-content/themes/unstandard/images/logo.png"></a>

just after

<div id="leaderboard" class="fix">

BONUS: Why not add a favicon while your busy hacking? Just add the following in your header

<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />

Add it just after the < head > tag and upload your favicon.ico in your theme root.

UPDATE 2: Fixing the Recent Comments

Get this widget: Widget for Simple Recent Comments, although the default one is fine too, this one can be tweaked more.
Alter line 100 according to the following.

$output .= "\n\t<li><a href=\"" . get_permalink($comment->ID) . "#comment-" . $comment->comment_ID  . "\" title=\"on " . apply_filters('the_title_rss', $comment->post_title) . "\">" . $comment->comment_author . ": ''" . strip_tags($comment->com_excerpt) . $dots . "''</a></li>";

That should do the trick!

UPDATE 3: An Unstandard Pagination

Wanna add pagination in your Unstandard theme homepage? Just follow these installation tips at Adding Nice Wordpress Pagination.
And find in your home.php

<?php query_posts('showposts=9'); ?>

and change it into

<?php query_posts(); ?>

And don’t forget to adjust in your Settings > Reading > Blog pages show at most the desired number of posts to show. For example 9.