aquagrrl (@aquagrrl)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • aquagrrl
    Member

    @aquagrrl

    Okay, I’ve managed to figure some of it out, I’m using:

    <br />
    <pre><code><?php $posts = get_thread( $topic->topic_id, $page ); //pulls posts fo each topic?>
    <li <?php topic_class(); ?> style="border: 1px solid green;">
    <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
    <ul class="TopicStarterInfo">
    <li><?php post_author_avatar(); ?></li>
    <li><?php post_author_link(); ?></li>
    <li><?php post_author_title(); ?>
    <li><?php printf( __('Posted %s ago'), bb_get_post_time() ); ?> </li>
    <li><?php echo $bb_post->forum_id;?></li>
    </ul>
    <?php endforeach; ?>

    But its pulling all the post authors. I think I need to limit to the first one, but I’m not exactly sure how to do that.

    Edit: figured it out from: https://bbpress.org/forums/topic/separating-the-first-post-of-each-topic#post-21808

    using:

    <?php $bb_post = $posts[0]; unset($posts[0]); $del_class = post_del_class();?>

    instead of the foreach.

Viewing 1 replies (of 1 total)