Reply count in widget Latest posts
-
Help!
I’m trying to get replycounts after the the latest posttitle. (widget)
e.g:
Avatar – Name – date – title – (number of replies)
I can’t get it working. This is sofar I have now:$forum_id = bbp_get_topic_forum_id($topic_id); $topic_id = bbp_get_topic_id($widget_query->post->ID); $reply_id = bbp_get_reply_id( $widget_query->post->ID ); $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.bbp_get_topic_post_count($forum_id, $topic_id, $total_count).')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';
This is a snippet form the BBP latest post widget. It counts replies but not for separatly the latest post. It gives wrong results and those countresults are different on what page you’re visting. (index, forum, topicpage ect.)
Could somebody put me in the wright direction?Many thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.