Title: Author.php removes formatting
Last modified: August 18, 2016

---

# Author.php removes formatting

 *  [AMSmith](https://wordpress.org/support/users/amsmith/)
 * (@amsmith)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/)
 * I’m trying to set up author pages to include bios of the writers for my blog.
   The author page dumps the “About the user” field in Users>Authors & Users into
   the Details section in my author.php.
 * The problem is that the “About the user” field is stripped of HTML. It keeps 
   HTML links and bold formatting, but removes all paragraph markings. Without such
   HTML being accepted, it leaves me with huge chunks of hard-to-read text.
 * Is there a way to get the “About the user” field to KEEP the paragraph markings?
 * Here is how the author.php sets up this section:
 * [http://blog.mormonmomma.com/wordpress/author/alison-moore-smith/](http://blog.mormonmomma.com/wordpress/author/alison-moore-smith/)
 * Here is how I want the formatting to look.
 * [http://blog.mormonmomma.com/wordpress/author-bios/alison-moore-smith/](http://blog.mormonmomma.com/wordpress/author-bios/alison-moore-smith/)
 * Any help greatly appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [AMSmith](https://wordpress.org/support/users/amsmith/)
 * (@amsmith)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-543736)
 * I’m desperate! Any ideas? Is the post making any sense or do I need to reword?
 *  Thread Starter [AMSmith](https://wordpress.org/support/users/amsmith/)
 * (@amsmith)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-543853)
 * Anyone? 🙁
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-543861)
 * Author descriptions are filtered through the kses filter when you save the user.
   kses only allows certain tags.
 * To disable this behavior, add this to your theme’s functions.php file, after 
   the <?php line:
    `remove_filter('pre_user_description', 'wp_filter_kses');`
 * If you have no functions.php file in your theme’s directory, make one and add
   this to it instead:
 *     ```
       <?php
       remove_filter('pre_user_description', 'wp_filter_kses');
       ?>
       ```
   
 *  Thread Starter [AMSmith](https://wordpress.org/support/users/amsmith/)
 * (@amsmith)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-543873)
 * Otto42, thank you!
 * I do have a functions.php file, but it has multiple lines that begin with
 * <?php
 * I tried to place the code in a few places within those tags, but couldn’t get
   the page to change. Am I placing it wrong?
 * As I look at this, however, I think the solution has to come from the core. When
   I put HTML into the “About Yourself” field, and save, the paragraph markers disappear.
   The are stripped out by WP when saved, not when the page is created.
 * Can’t figure out why this would be done. Is there a way to enter them that won’t
   be removed?
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-543884)
 * > _I tried to place the code in a few places within those tags, but couldn’t 
   > get the page to change._
 * The page isn’t going to change just from adding a line.
 * That HTML code you put in the about me field is *gone*. It was never saved in
   the first place. It got filtered before being saved. This line of code I’m telling
   you to add will disable that filter so that the page will actually save your 
   HTML.
 * So after you put this line in (immediately after the very first “<?php” in the
   functions.php file in your theme’s directory… NOT the functions.php in the wp-
   includes directory!), go back to the users admin page and edit the About stuff
   to be correct again and save it. *Then* it will show up.
 *  Thread Starter [AMSmith](https://wordpress.org/support/users/amsmith/)
 * (@amsmith)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-543899)
 * Yes, I knew that. 🙂 I did go back and put the HTML back in before I tested it.
   And I did edit the correct file. I did not, however, put it in the right place.
 * Now, when I save, the formatting is intact.
 * However, another problem has appeared. Ah, but I fixed it in the author.php file.
 * Otto, thank you for your time and expertise. Your assistance has been invaluable
   and I sincerely appreciate it.
 *  [majord](https://wordpress.org/support/users/majord/)
 * (@majord)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-544061)
 * What HTML is used to create line breaks such as 
   ? I’ve tried both  and <p> and
   the HTML is still getting stripped after adding the suggested code to my theme’s/
   theme/mytheme/functions.php.
 *  [mrbill9999](https://wordpress.org/support/users/mrbill9999/)
 * (@mrbill9999)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-544104)
 * Worked like a champ – thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Author.php removes formatting’ is closed to new replies.

## Tags

 * [author](https://wordpress.org/support/topic-tag/author/)
 * [author.php](https://wordpress.org/support/topic-tag/author-php/)
 * [formatting](https://wordpress.org/support/topic-tag/formatting/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 4 participants
 * Last reply from: [mrbill9999](https://wordpress.org/support/users/mrbill9999/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/authorphp-removes-formatting/#post-544104)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
