Hi, you can try as follow
--wpf.class.php
Add this funtion
function latest_threads_in_forum($forum = 1, $num = 5, $ul = true){
global $wpdb;
$toShow = 0;
$posts = $wpdb->get_results("SELECT * FROM $this->t_threads WHERE parent_id=$forum ORDER BY <code>date</code> DESC LIMIT 50");
if($ul) echo "<ul class='forumtwo'>";
foreach($posts as $post){
if($toShow < $num)
{
//$user = get_userdata($post->author_id);
if($this->have_access($this->forum_get_group_from_post($post->parent_id)))
echo "<li class='forum'><a href='".$this->get_paged_threadlink($post->parent_id, '#postid-'.$post->id)."'>".$this->output_filter($post->subject)."</li>";
$toShow += 1;
}
}
if($ul)echo "</ul>";
}
--wpf-main.php
Add this function
function latest_threads_in_forum($forum = 1){
global $mingleforum;
return $mingleforum->latest_threads_in_forum($forum);
}
--In template file (sidebar.php)
<?php latest_threads_in_forum(2, 5, true); ?>