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 .= '
'; } if ( ! empty( $user_description ) ) { $author_details .= ' '; } $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' );