I’ve got a post format of Image, and I am running into an issue where the image is being wrapped by a <p> tag. I want to get rid of that tag (specifically on the single.php version) of those post types.

How can I get inside the formatting in a theme and remove the <p> tags, or create any format that I want for the output of this type of post, without affecting posts of a different post format?

12 s
12

By default, WordPress adds paragraph

tags to category descriptions. Stop this by adding the following to your functions.php file

// Remove p tags from category description
remove_filter('term_description','wpautop');

Simple and easy (codeless).

Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *