Rusty has written a plugin which gives the same effect, but means you don't need to mess with the code.
http://russ.innereyes.com/2005/01/the-rustasides-wp-15-plugin/
This will work in any template and any version to date.
This code will enable you to add Matt's Asides to a 1.5 install.
Change the 'category(14)' number to the one you have set for your asides.
You will need to style 'ul linklog' in your css. (See below)
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Comment it out like this:
<?php //if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
if ($posts)
{
function stupid_hack($str)
{
return preg_replace('|</ul>\s*<ul class="linklog">|', '', $str);
}
ob_start('stupid_hack');
foreach($posts as $post)
{
start_wp();
?>
<?php if ( in_category(14) && !is_single() ) : ?>
<ul class="linklog">
<li id="p<?php the_ID(); ?>"><?php echo wptexturize($post->post_content); ?>
<span><?php comments_popup_link('(0)', '(1)',
'(%)')?> <a href="<?php the_permalink(); ?>"
title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>"
rel="bookmark">¶</a> <?php edit_post_link('(e)'); ?></span></li>
</ul>
<?php else: // If it's a regular post or a permalink page ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
Delete those lines
And instead, paste these lines:
<?php endif; // end if in category ?>
<?php
}
}
else
{
echo '<p>Sorry no posts found.</p>';
}
?>
ul.linklog li {
border:1px solid #ff0000;
font:Verdana;
font-size:14pt;
background-color:#ffff00;
}
ul.linklog li a {
text-decoration:none;
}
These pages are independent of http://wordpress.org
All design, content & images © Mark 2004-2008. All rights reserved.