Is there anyone who can give me a hand?
By the way, the following code to display “Comment, Reply, Topic create” works even after Ajax.
function my_echo_activity_type( $replyId ){
$posttype = get_post_type( $replyId );
$replyToId = bbp_get_reply_to( $replyId );
if( $posttype == 'topic' ){
echo '<span class="type">Topic create</span>';
}
elseif( $posttype == 'reply' && $replyToId != '0' ){
echo '<span class="type">Reply</span>';
}
elseif( $posttype == 'reply' && $replyToId == '0' ){
echo '<span class="type">Comment</span>';
}
}
Thank you.
But that code does not work with Ajax as well.
The topic title is displayed at first, but after Ajax the title of the reply will be displayed.
The same is true for bbp_get_reply_topic_id
.