Allow Post Author Bio HTML Markup

WordPress doesn’t allow some HTML tags to be used in the author Biographical Info field. By default you can use strong and a href tags. If you have authors with lots of biographical info you might want to use paragraphs and or line breaks to split the information up. Here is how:

1. Go to PluginsAdd New and search for Code Snippets. Activate after installing.

2. Go to SnippetsAdd New and name your snippet. The name doesn’t matter, we’ve named ours Filter Author Bio.

3. In the snippet body, insert the following:

// Disable WordPress sanitization to allow more than just $allowedtags from /wp-includes/kses.php.
remove_filter( 'pre_user_description', 'wp_filter_kses' );
// Add sanitization for WordPress posts.
add_filter( 'pre_user_description', 'wp_filter_post_kses' );

4. Finally, enable the option to Only run in administration area and click Save changes and activate.

5. You can now go to Users and add HTML tags as required to the Biographical Info field. Tags you might want to use are:

Paragraphs

<p>This is a paragraph.</p>

Line breaks

<br>

Links
a href tags are supported without the need for the above Code Snippet.

<a href="https://purothemes.com">Link to Puro</a>

Strong
strong tags are supported without the need for the above Code Snippet.

<strong>Bold text</strong>
Last updated: 15/11/2019