Office Address

41/D, West Brahmondi, Narsingdi

Phone Number


Email Address

This short code will show the current topic info of the bbpress forum plugin on the sidebar. You can place this code on your theme functions.php file.


[php] /**
* bbpress topic info short code
function bbpress_topic_info_func( $atts ){

global $wp_query;
$post = $wp_query->get_queried_object();

if($post->post_type == "topic"){



<ul class="topic-info">
<li class="topic-forum">
In:<?php echo get_the_title($post->post_parent);?>
<li class="reply-count">
<?php echo bbp_get_topic_post_count($post->ID, false);?> Replies
<li class="voice-count">
<?php echo bbp_get_topic_voice_count($post->ID, false); ?> Participants
<li class="topic-freshness-author">
Last Activity <?php echo bbp_get_topic_last_active_time($post->ID, false); ?>
<li class="topic-subscription-link"><?php bbp_topic_subscription_link(); ?></li>
<li class="topic-favorites-link"><?php bbp_user_favorites_link(); ?></li>

return ob_get_clean();


add_shortcode( ‘bbpress-topic-info’, ‘bbpress_topic_info_func’ );

* bbpress subscription link | hide
* From

function hide_before ($args = array() ) {
$args[‘before’] = ”;
return $args;
add_filter (‘bbp_before_get_forum_subscribe_link_parse_args’,’hide_before’) ;

You can use this short code like this [bbpress-topic-info]


Written by

Maidul Islam

I am a freelance web developer.Like to share what i learn.