Skip to:

Last Post Data

  • answerthink


    I am a beginner with a beginner question: On the front page in the “Latest Discussions” section, there are columns for Last Poster and Freshness. However, in the “Forums” section, there are no such columns.

    I would like to add this information in the “Forums” section as well (and then eventually delete the “Latest Discussions” section). I have added the two column headers (actually combined into one column that has both pieces of info in it), but I have no idea how to get the correct data (which I want to search all the topics from within each forum and pull the latest poster and time details).

    The code I currently have is below (for the site It’s formatted how I want it, but I have no idea what post data it is pulling (I want it to pull the latest post from any topic within each forum)… Can anyone help?

    <?php if ( bb_forums() ) : ?>

    <h2><?php _e(‘Forums’); ?></h2>

    <table id=”forumlist”>


    <th><?php _e(‘Main Theme’); ?></th>

    <th><?php _e(‘Topics’); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    <th><?php _e(‘Last Post’); ?></th>


    <?php while ( bb_forum() ) : ?>

    <tr<?php bb_forum_class(); ?>>

    <td><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><small><?php forum_description(); ?></small><?php bb_forum_pad( ‘</div>’ ); ?></td>

    <td class=”num”><?php forum_topics(); ?></td>

    <td class=”num”><?php forum_posts(); ?></td>

    <td class=”num”>by “><?php topic_last_poster(); ?>
    on <?php echo date(“D M j, Y g:i a”, strtotime($topic->topic_time)); ?></br></td>


  • You must be logged in to reply to this topic.
Skip to toolbar