gridlock-cap
WordPress

WordPress Zen: Gridlock Theme is Back?

Gridlock Theme
Gridlock Theme

Well, knock me down with a feather. I haven’t looked at hyalineskies Gridlock Theme since I began using WordPress back in 2004. Hailed by many as one of the first ‘magazine style’ themes, I cut many a tooth during those months attempting to force Gridlock to bend to my bidding. It was work.

Gridlock was a pretty locked-down theme as far as WordPress Themes are concerned. But, things have chanced since the days of WordPress 2.x and I was curious how Gridlock had grown. Hyalineskies is not longer available, as Eston Bond has moved on to other things. But a decent run-down of its functionality is still up on his site and is still being managed at Github.

Well, it hadn’t grown much… but the documentation is much better this time around. Photoshop PSD files are included so you can change the header & About graphic… a nice feature when you don’t want to start from scratch. Even if you don’t own the “Helvetica Neue Ultra Light” font, there are tips on which fonts are similar… those with Mac’s will already have several installed.

Yet, those issues are relatively minor when faced with possibly still the biggest issue with Gridlock: Lack of a WordPress-uniform menu structure. You are forced to add all your menu items by hand. Although it gives you complete control over your menu structure, those with little PHP and HTML experience will be extremely frustrated… even with the addition of commented instructions in the index.php file.

Gridlock also incorporates sIFR 3 for its fonts. sIFR or “scalable Inman Flash Replacement” is a method to use additional fonts that are not typically installed on web browsers. I don’t know of any other WordPress Themes that use sIFR. But, it is certainly one of the more intriguing aspects of Gridlock.

In order to bring Gridlock into compliance with WordPress users, here are some suggestions to wrangle Gridlock into submission. 🙂 As with most WordPress Theme changes… make a backup and keep it locally in case you really “screw the pooch”.

Add a better Menu

First, we’ll start with cutting some stuff from the header.php file, like the “home” link… comment-out or delete the following lines…

<div><a href="<?php bloginfo('home'); ?>" title="home">home</a></div>
...
<?php if(get_option('gridlock_about_slug') != '') { ?>
<div>
  <a href="<?php bloginfo('url'); ?>/
    <?php echo(get_option('gridlock_about_slug')); ?>"
     title="about">about</a>
</div>
<?php } ?>
...

If you aren’t using De.licio.us or Flickr, then you COULD delete those lines as well, but with these components configurable in the Admin Page, we’ll let them be…and leave them ‘blank’ as well.

just above the nav_right class div, enter the WordPress list pages code; wrapped in <ul> fashion…

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

… so that it ends up looking like this:

<ul><?php wp_list_pages('depth=1&title_li='); ?></ul>
<div class="nav_right">

Now, we’ll need the appropriate CSS to keep everything in check. I chose to modify the .nav class and associate it with a <ul> tag. It’s not perfect, but I already am familiar with creating horizontal menus using the wp_list_pages code. To do this change Gridlocks’s style.css .nav to ul.nav… delete ALL modifiers and enter in the following css styles:

ul.nav {
font-weight: bold;
font-size: 14px;
line-height: 30px;
text-align: left;
text-transform: lowercase;
float: left;
height: 30px;
padding: 0px;
margin: 0px;
}

Now, we’ll need to add the associated <li> tag and some formatting:

ul.nav li {
 list-style: none;
 float: left;
 border-right: 1px solid #ccc;
 padding: 0px 3px 0px 3px;
 text-align: left;
 }

Build a Better Footer

If you take a look at footer.php, you’ll think that everything is in order… but it’s not. They’ve commented-out all the footer text… which leaves the bottom of Gridlock a little lacking… as if something is broken. So, we’ll start with better formatting. Modify the footer ID in the style.css file to look like this:

#footer {
 background-color: #333333;
 color: #fff;
 font-family: Helvetica,Arial,sans-serif;
 font-size: 12px;
 height: 25px;
 padding:5px 0 0 5px;
 vertical-align: middle;
}
#footer a {
 border: 0px;
}
#footer a:link,
#footer a:visited {
 color: #7DB5F4;
 text-decoration: none;
}
#footer a:hover,
#footer a:active {
 color: #7DB5F4;
 text-decoration: none;
}

But Wait! There’s more! In the footer.php file, move the wp_footer call to just above the </body> tag, so that it looks like this:

</div>
<?php wp_footer(); ?>
</body>

Finally, move the entire <div> that contains the footer ID from outside the commented-out php call, to just above the wp_footer call, so that it looks like this:

<div id="footer">
 Powered by <a href="http://wordpress.org/">WordPress</a>&nbsp;|&nbsp;
 <a href="http://hyalineskies.com/wordpress/gridlock/" title="Gridlock theme at hyalineskies">Gridlock 1.6</a> by
 <a href="http://hyalineskies.com/" title="hyalineskies">hyalineskies</a>&nbsp;|&nbsp;
 <?php wp_loginout(); ?>
</div>
</div> <?php // end the main content wrapper ?>
</div>
<?php wp_footer(); ?>
</body>

Why are we missing the standard WP image styles?

Argh! I noticed that I couldn’t align-left or align-right any images I placed into my posts. Some digging around, and I found those “nearly standard” styles were missing the the Gridlock css file. So, enter these lines:

.alignleft {
 float: left;
 margin-right: 5px; /* add some margin */
}

.alignright {
 float: right;
 margin-left: 5px; /* add some margin */
}

.wp-caption-text {
 text-align: center;
}

Is That It?

Yes, but if you are using Next Gen Gallery as your photo gallery plugin, then you’ll run into some problems. In every paragraph you have added a Single Pic, you’ll notice the formatting for that paragraph gets COMPLETELY blown away. NGG has a bug where it does not properly wrap everything in a <p></p>. So, if your parent div or class is missing the child <p> styling… it’ll never look right. I was able to fix this by adding the text & font styling to the main_content ID in Gridlock’s style.css file:

color: #101010;
 font-family: Helvetica,Arial,sans-serif;
 font-size: 12px;
 font-weight: normal;
 line-height: 18px;

In Conclusion

I love this theme and I may very well keep using it for a while. The only thing holding me back is my concern regarding my patience to massage Gridlock into behaving with the current state of WordPress 2.9+. But, what I have above should get you started… or at least relieve some of your headaches.

If you have any questions, drop me a comment and I’ll try to figure out what’s going wrong.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.