Alternate Recent Posts: Small code fix for the list that is output 1
I’ve been using Alternate Recent Posts for about 2 hrs now and ran into one small issue with the code.
I noticed that basically how the plugin works is that is loops through posts, compares and then skips the ones that are on the post loop for the page already. In the code, there was a spot where the post determines if it’s going to actually output anything for each post it checks.
Line 88 (all this should be on one line):
<li><a href="<?php the_permalink() ?>"><?php
if ( get_the_title() ) the_title();
else the_ID(); $postcount++; endif; ?> </a></li>
Just change that to this:
<li><a href="<?php the_permalink() ?>"><?php
if ( get_the_title() ) the_title();
else the_ID(); $postcount++;
?></a></li><?php endif; ?>
… and you won’t have any hanging html tags.
Related posts:




Many thanks for this fix! I’ve updated v0.3 to include it.