Show topics from specific users (iD) with bbPress in a loop

52 Views Asked by At

i'm looking for an option to show topics from specific users (iD) with bbPress. So basicly every user will show automatically a activity stream with there own topics. I've setup the following loop, but that generate all the created topics from all users.

 <?php
$authID = bbp_has_topics( 'ID' );
$query = new wp_query( array( 'author' => $authID,'post_type' => 'topic', 'post_status' => 'publish', 'posts_per_page' => '7' ) );  if ( $query->have_posts() ): ?>
<h6>Mijn prikbord</h6>
<?php while ( $query->have_posts() ): $query->the_post(); ?>
<!-- Start template -->
<div><a aria-label="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
<!-- End template  -->
<?php endwhile; else: ?>
<h6>Nog geen berichten</h6>
<?php endif; ?>

Anybody an idea how to generate topics and show them per user? Many thanks!

0

There are 0 best solutions below