I should add that this appears in loop-single-forum.php where I am including a condition:
<?php $forum_id = bbp_get_forum_id();
if (( $forum_id == 40250) or ( $forum_id == 41369) ){
?>
I’d like to then follow this with something that displays the latest topic permalink/title and topic author/avatar.
I’ve sorted it (excuse formatting):
if (( $forum_id == 40088) ){
?>
<?php $args = array( 'post_type' => 'topic', 'posts_per_page' => 1, 'post_parent' => '40088' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();?>
<li class="fa-thumb"><div text-align="center"><a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon'));?><br>
<span class="fa-link"><?php bbp_topic_title(); ?></span></div></li>
<?php
endwhile;
?>
<?php
}