NOTE !
1 - BACKUP YOUR INDEX.PHP FIRST
2 - Change the 'category(14)' number to the one you have set for your asides.
3 - You will need to style 'ul linklog' in your css. (See below)


In index.php, find this line:
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
Comment it out like this:
<?php // if ($posts) : foreach ($posts as $post) : start_wp(); ?>


Right under that, paste this:
<?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();
?>


The next line should be your date call, and straight under that, paste this:
<?php if (in_category(14) && !$single) { ?>
<ul class="linklog">
<li><?php echo wptexturize($post->post_content); echo ' '; comments_popup_link('(0)', '(1)', '(%)' ) ?></li>
</ul>
<?php } else { ?>


Now scroll down, until you see this:
<?php endforeach; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>


Comment those lines out too - like this:
<?php // endforeach; else: ?>
<p><?php //_e('Sorry, no posts matched your criteria.'); ?></p>
<?php // endif; ?>


And instead, paste these lines:
<?php } // end if in category ?>
<?php } } else {
echo '<p>Sorry no posts found.</p>'; } ?>


That should install the 'Asides' hack.


Styling.
This is one format for your css, and I only include as much formatting just to illustrate that you have as much control over this as any other element. Change it to suit your page - what I've written here will almost certainly not !

ul.linklog li {
border:1px solid #ff0000;
font:Verdana;
font-size:14pt;
background-color:#ffff00;
}

to change the link behaviour:
ul.linklog li a {
text-decoration:none;
}

This is also a list, and as it is, will have those lovely bullets next to each item. If you are one of that rare breed with a dislike of those black discs, you have 4 ways of dealing with it.

1. Add 'list-style:none;' to the ul.linklog li above.

2. Add 'list-style:lower greek;' to the same part of the css. Other list-style-types can be found at http://www.w3.org/TR/REC-CSS2/generate.html#lists.

3. Create a small image of your own, and use that. The syntax is 'list-style-image: url('bug.gif');'

4. Add something to the code above. An example - in the code above is this line:
?php echo wptexturize(
change that part to read:
?php echo '&raquo;&nbsp;'; echo wptexturize(
That will give you those two little arrows like this »

Credit: Gregorsmith who kindly posted to the WP forums, Beel and Lawtai in the forums.

 

These pages are independent of http://wordpress.org
All design, content & images © Mark 2004-2008. All rights reserved.