Hello all,
I'm having trouble getting this function to run in with WP_Query: bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?>
Here's my query:
bbp_get_topic_post_type(),
'posts_per_page' => 5,
'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
'ignore_sticky_posts' => true,
'no_found_rows' => true,
'meta_key' => '_bbp_last_active_time',
'orderby' => 'meta_value',
'order' => 'DESC',
); ?>
have_posts() ) : ?>
have_posts() ) : $BB_Query->the_post(); ?>
bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?>
I found [[LINK href="http://bbpress.org/forums/topic/wp_query-post-type-topic-help/"]]this bbress thread[[/LINK]] of someone having a similar problem. I swapped out bbp_get_topic_last_active_id() for a post id as said at the bottom and got an avatar to for that post so it most be bbp_get_topic_last_active_id().
I'm not sure what was meant by this though:
Or you could try
echo “bbp_get_topic_last_active_id() is “. bbp_get_topic_last_active_id() ;
to see what number that is producing at that point to know that it is doing something
if so, then you can try
[[LINK href="http://phpcrossref.com/xref/bbpress/_functions/bbp_get_topic_last_active_id.html"]]Here's bbp_get_topic_last_active_id code[[/LINK]]
Thank you for all of your help :D
Solution - 1
You can try this code:
bbp_get_topic_post_type(),
'posts_per_page' => 5,
'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
'ignore_sticky_posts' => true,
'no_found_rows' => true,
'meta_key' => '_bbp_last_active_time',
'orderby' => 'meta_value',
'order' => 'DESC',
);
$BB_Query = new WP_Query( $topics_query );
if ( $BB_Query->have_posts() ) :
?> have_posts() ) : $BB_Query->the_post(); ?>
-
Started by: get_the_ID(), 'type' => 'avatar', 'size'=>32 ) ); ?>
Freshness by: get_post_meta( get_the_ID(), '_bbp_last_active_id', true ), 'type' => 'avatar', 'size'=>32 ) ); ?>
the output (screenshot):

Solution - 2
Have you tried using [[LINK href="http://codex.bbpress.org/bbp_topic_author_link/"]]bbp_topic_author_link()[[/LINK]] instead of bbp_author_link()?
Solution - 3
Hello,
Try
bbp_get_topic_last_active_id( $topic_id ), 'size' => 14 ) ); ?>
instead of
bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?>
in your loop.
|