Want more features on Pastebin? Sign Up, it's FREE!
Guest

r-a-y

By: a guest on Aug 24th, 2010  |  syntax: None  |  size: 0.42 KB  |  views: 166  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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' );
clone this paste RAW Paste Data