Aleš Sýkora / November 28, 2023 / 0 comments

Enable HTML tags in user BIO field in WordPress

Post summary: If you want to have nice user Archive page with nice description, you would need to use HTML tags to do some proper formatting in user Bio. Then you can create nice text with links like this: Add this code to your Advanced Scripts plugin (or other code snippets plugin):

If you want to have nice user Archive page with nice description, you would need to use HTML tags to do some proper formatting in user Bio. Then you can create nice text with links like this:

Add this code to your Advanced Scripts plugin (or other code snippets plugin):

// 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' );

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

0 comments

Share Your Thoughts