bbp_get_forum_title is pulling the topic title instead
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 ) :
<?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.
The topic ‘bbp_get_forum_title is pulling the topic title instead’ is closed to new replies.