sbrajesh

Brajesh Singh

Jul 20th, 2010
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. /* fix title on advance search page*/
  2.  
  3. add_filter("bp_page_title","bpmag_fix_page_title");
  4.  
  5. function bpmag_fix_page_title($title){
  6. if(! bpmag_is_advance_search())
  7. return $title;//if not advance search page, return title
  8. //for adv search
  9. global $current_blog;
  10. if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) {
  11.         $blog_title = get_blog_option( $current_blog->blog_id, 'blogname' );
  12.     } else {
  13.         $blog_title = get_blog_option( BP_ROOT_BLOG, 'blogname' );
  14.     }
  15.  
  16. $title=$blog_title . ' | ' .__("Search");
  17.  
  18. if(!empty($_REQUEST['search-terms'])
  19. $title.=' | '.$_REQUEST['search-terms'];//include search term
  20.  
  21.     return $title;
  22.  
  23. }
Add Comment
Please, Sign In to add comment