Advertisement
paradonym

Radium Wordpress Theme fix for double title

Jul 25th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. function radium_wp_title( $title, $sep ) {
  2.     if ( is_feed() ) {
  3.          return $title;
  4.     }
  5.  
  6.     global $page, $paged;
  7.  
  8.     // Add the blog name
  9.     /* COMMENT: Issue with doubled page description and title in head-title solved by commenting out below code. */
  10.     // $title .= get_bloginfo( 'name', 'display' );
  11.  
  12.     /* // Add the blog description for the home/front page.
  13.     $site_description = get_bloginfo( 'description', 'display' );
  14.     if ( $site_description && ( is_home() || is_front_page() ) ) {
  15.         $title .= " $sep $site_description";
  16.     } */
  17.  
  18.     // Add a page number if necessary:
  19.     if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
  20.         $title .= " $sep " . sprintf( __( 'Page %s', 'radium' ), max( $paged, $page ) );
  21.     }
  22.  
  23.     return $title;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement