Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to prevent WP from stripping the HTML from the author bio? I need it to keep my paragraphs.

Thanks in advance! :)

Edit - Although this question has been answered, I will clarify that I was referring to the Bio textarea when editing individual users.

share|improve this question
    
The WYSIWYG editor allows html in WordPress so are you referring to some author bio input elsewhere? Please be a bit more specific where you mean. –  Brady Jun 28 '11 at 16:00

1 Answer 1

up vote 4 down vote accepted

remove the filter that formats the description. put this in your theme's functions.php:

remove_filter('pre_user_description', 'wp_filter_kses');

EDIT - I should mention, if you allow random people to register and add their own bio for display on the site, not filtering that text could enable bad things.

share|improve this answer
    
Oh, excellent! The solutions I was finding were about editing the core, and this will be much better! Thanks! –  5t3ph Jun 28 '11 at 16:09
7  
Why not add a more permissive filter after removing the default filter? e.g. add_filter( 'pre_user_description', 'wp_filter_post_kses' ); that way, user-input content isn't completely unsanitized. –  Chip Bennett Jun 28 '11 at 16:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.