I'm trying to implement the remaindered link/aside feature for my personal site. The site is built off the Kubrck template, and isn't drastically different underneath.
I tried using the widely available aside code:
<?php //if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<?php if ($posts)
{
function stupid_hack($str)
{
return preg_replace('|<br/>s* |', '', $str);
}
ob_start('stupid_hack');
foreach($posts as $post)
{start_wp(); ?>
<?php if ( in_category(21) && !is_single() ) : ?>
with "21" being the category ID for links. But everytime I insert this code into my index.php page, I get an error on the subsequent <?php endwhile; ?>. If I remove that code, the next php declaration shows an error, etc. on down the line.
What am I doing wrong? I'm a total php newbie, and any help would be appreciated.