Skip to:

bbp_get_forum_title is pulling the topic title instead

  • aravoth2011


    When I use bbp_get_forum_title to pull the forum title for display on the front page of my website, it pulls the topic title instead.

    The idea is to display the forum title like categories are displayed in wordpress.

    To do this I’m using breadcrumbs, so my code looks like..

    <?php $show_sep = false; ?>
    <?php if ( 'forum' == bbp_get_forum_post_type() ) : ?>
    $breadcrumbs = '<a href="' . bbp_get_forum_permalink( $parent->ID ) . '">' . bbp_get_forum_title( $parent->ID ) . '</a>';
    if ( $breadcrumbs ) :
    <span class="cat-links">
    <?php printf( __( '<span class="%1$s">Posted in</span> %2$s ' ),'', $breadcrumbs);
    $show_sep = true; ?>
    <?php endif; // End if $breadcrumbs ?>

    It’s not working, it’s displaying the topic title instead. In fact I went through several variations of this, several of them not using breadcrumbs, but every time I would use bbp_get_forum_title, or bbp_get_topic_forum_title, and I just couldn’t get it to work.

    I’m wondering if there is something wrong with my code, or if anyone knows any other reason why bbp_get_forum_title would display the topic title instead.

    I really just started learning all this stuff recently, so I could really use a hint or two..

    Thanks for any help anyone can offer.

Viewing 4 replies - 1 through 4 (of 4 total)

  • aravoth2011


    I have noticed that my permalink structure when viewing a forum topic looks like this,

    could this have something to do with it? Shouldn’t the permalink look like.. ?

    Honestly I’m kinda baffled. even bbp_get_topic_forum_title only pulls the topic title.



    you can see an example of what I’m trying to pull off at

    The area in question is the meta data for the post that is situated just below the featured slider. You’ll see an area that reads “posted in”. It should say “posted in General Discussion”, rather than “posted in whatever the topic title is”



    You need to actually do your query loop, probably using bbp_has_posts()

    The if ‘forum’ == bit will always equal true, so you can remove it.

    Rescue Themes


    Really old thread but sharing my solution in case it’s helpful for anyone else. I used:

    <?php single_post_title(); ?>

    Instead of:


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘bbp_get_forum_title is pulling the topic title instead’ is closed to new replies.
Skip to toolbar