Skip to content

Instantly share code, notes, and snippets.

@ahmadawais
Last active November 16, 2017 17:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ahmadawais/104579123483c7ff5d55d71b459b28c0 to your computer and use it in GitHub Desktop.
Remove the `p` Paragraph Tags From Author Description in WordPress
<?php
/*
Remove the `<p></p>` Tags From Author Description in WordPress
Since WordPress 4.9 by default WordPress adds paragraph tags to the author descriptions.
This sometimes breaks your theme styles. Stop this by adding the following to your `functions.php` file.
*/
// Remove p tags from author description.
remove_filter( 'get_the_author_description', 'wpautop' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment