Re: Editing Group and Forum page title tags
@r-a-y @boonegorges — Unfortunately, this function just broke under BP1.2-RC3:
Fatal error: Call to undefined function: bp_has_topic_posts() in…
Here is the complete function from you guys provided above:
/* Custom function to re-write Forum title tags */
function my_page_title( $title, $b ) {
global $bp;
if ( $bp->current_action == ‘forum’ && $bp->action_variables[0] == ‘topic’ ) {
if ( bp_has_topic_posts() ) {
$topic_title = bp_get_the_topic_title();
$title .= ‘ | ‘ . $topic_title;
$title = str_replace( ‘ | Groups’, ”, $title );
$title = str_replace( ‘ | Forum’, ”, $title );
}
}
return $title;
}
add_filter( ‘bp_page_title’, ‘my_page_title’, 10, 2 );
?>
Any help on this greatly appreciated. Thanks.