Advertisement
Guest User

WP-Title snippet

a guest
Jan 19th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. function casual_wp_title($title,$sep){
  2.  
  3.     global $page, $paged;
  4.     $title .= get_bloginfo( 'name' );
  5.     $site_description = get_bloginfo( 'description', 'display' );
  6.     if ( $site_description && ( is_home() || is_front_page() ) )
  7.         $title = "$title $sep $site_description";
  8.  
  9.     if ( $paged >= 2 || $page >= 2 )
  10.        
  11.         $title = "$title $sep " . sprintf( __( 'Page %s', 'casual' ), max( $paged, $page ) );
  12.        
  13.         return $title;
  14. }
  15. add_filter( 'wp_title', 'casual_wp_title', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement