Skip to content

Fixing the blog, Part 2

I really liked the Hope theme that I had for a while as I thought it looked great. There were a few minor problems with it, but I’d emailed the designer and she said she’d try to look into it. Apart from not being widget-ready, some of the latest themes have got microformats embedded into them, and this is something I wanted.

Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards” - Microformats.org

In short, they add certain class names to HTML elements. Sandbox is the first known theme to have hCard and hAtom microformats, and the Barthelme theme, which this site is heavily based on, is a follow on from that. I’ve also added an hResume plugin and a hReview plugin (plugin removed, as it wasn’t working well) (see my review of this plugin) to really offer some good data to the world. Following on from my previous problems, I still couldn’t display the thumbnail-linked images on their own page. I could in the default theme, so the problem had to be with the Barthelme files. This time attachment.php was the starting point, and after comparing it to the default attachment.php I could see that there were two important lines of code missing from lines 7 and 8:

<?php $attachment_link = get_the_attachment_link($post->ID, true, array(450, 800)); ?>
<?php $_post = &get_post($post->ID); $classname = ($_post->iconsize[0] <= 128 ? ’small’ : ”) . ‘attachment’; ?>

Without those lines, $attachment_link and $classname are not defined, and so the image doesn’t show. Well it now works, and so the only thing left to do is to tweak the theme even more to my own liking and add some more posts!

Other posts with an identical category

{ 2 } Comments

  1. Andrew Scott | January 19, 2008 at 10:04 | Permalink

    Hi Gary.

    I note that you talk about problems with the hReview plug-in. Specifically, what issues were you having with it? As the author, I’m keen to know so that I may have a chance to do something about it.

    Thanks.

  2. Gazza | January 19, 2008 at 11:50 | Permalink

    Hi Andrew,

    Thanks for your comment. As you’ll see, I think I was too pre-occupied at the time I first used it, and didn’t give it a fair trial. I’ve posted some thoughts on it, that may or may not be useful to you.

{ 2 } Trackbacks

  1. hReview WordPress Plugin by Gary Jones | January 19, 2008 at 11:44 | Permalink

    [...] a previous post, I’d mentioned that I’d installed the hReview plugin, but then deactiviated it due to [...]

  2. Fixing the blog, Part 1 by Gary Jones | January 25, 2008 at 16:42 | Permalink

    [...] However, this wasn’t the end of my problems. [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

Subscribe without commenting