How to Show Last Ten Posts in Sidebar?
I’m trying to show the last ten posts in my sidebar, but I am not entirely succeeding, what am I doing wrong? I thought I’d just need to adjust the code from latest discussion a bit. Obviously it doesn’t work like that.
<table class="recent_posts" cellspacing="0" width="100%">
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td><small><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></small></td>
<?php endforeach; endif; // $topics ?>
So how can I call the latest ten posts in the sidebar?
- You must be logged in to reply to this topic.