SHARE
TWEET

r-a-y

a guest Aug 24th, 2010 190 Never
  1. function my_add_forum_topic_to_page_title( $title ) {
  2.         global $bp;
  3.  
  4.         if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {
  5.                 if ( bp_has_forum_topic_posts() ) {
  6.                         $topic_title = bp_get_the_topic_title();
  7.                         $title = $topic_title . ' | '. $bp->bp_options_title . ' | ' . get_bloginfo( $name );
  8.                 }
  9.         }
  10.         return $title;
  11. }
  12. add_filter( 'bp_page_title', 'my_add_forum_topic_to_page_title' );
RAW Paste Data
Top