function wpb_author_info_box( $content ) { global $post; if ( is_single() && isset( $post->post_author ) ) { $display_name = get_the_author_meta( 'display_name', $post->post_author ); if ( empty( $display_name ) ) { $display_name = get_the_author_meta( 'nickname', $post->post_author ); } $user_description = get_the_author_meta( 'user_description', $post->post_author ); $user_website = get_the_author_meta( 'url', $post->post_author ); $user_posts = get_author_posts_url( get_the_author_meta( 'ID', $post->post_author ) ); $author_details = ''; if ( ! empty( $display_name ) ) { $author_details .= '

About ' . esc_html( $display_name ) . '

'; } if ( ! empty( $user_description ) ) { $author_details .= '

' . get_avatar( get_the_author_meta( 'user_email', $post->post_author ), 90 ) . nl2br( esc_html( $user_description ) ) . '

'; } $author_details .= ''; $content .= ''; } return $content; } add_filter( 'the_content', 'wpb_author_info_box' ); // Be cautious with this! remove_filter( 'pre_user_description', 'wp_filter_kses' );