[Resolved] Layout difference in previous pages
I’ve got a problem over at my blog, Blogging CSS. You can see I use a little square image on the top-right corner of the post image to signal the category it belongs to. The whole image, title and category icon are displayed with custom fields. Here is the code:
<div id="post-preview"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>" class="postTitle"><?php the_title(); ?></a></h1> <?php $image = get_post_meta($post->ID, "post_image", true); ?> <?php $cat = get_post_meta($post->ID, "cat_icon", true); ?> <img src="wp-content/themes/default/images/<?php echo $cat; ?>.png" alt="<?php echo $cat; ?>" class="cat-icon" /> <a href="<?php the_permalink(); ?>" class="screenshot"><img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" class="fullColumn" /></a> </div>
Everything works in the home page, but if you click on any of the previous pages, the category icon is replaced by it’s alt attribute, althought I’ve pasted the same exact code in the archives page template too.
Does anybody have an idea why this could be happening?
- The topic ‘[Resolved] Layout difference in previous pages’ is closed to new replies.