= 2 || $page >= 2 ) && ! is_404() ) { $title .= " $sep " . sprintf( __( 'Page %s', 'bemainty' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'bemainty_wp_title', 10, 2 ); function bemainty_setup_author() { global $wp_query; if ( $wp_query->is_author() && isset( $wp_query->post ) ) { $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author ); } } add_action( 'wp', 'bemainty_setup_author' );