Remove p tags from category description
By default Wordpress adds paragraph tags to category descriptions. Find out how to stop this.
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');
8 replies on “Remove p tags from category description”
Leave a Reply
-
HTML email signature in Apple Mail
Step by step guide on how to add an HTML signature to Apple Mail.
-
Secure your WordPress Blog
A guide to securing your WordPress website.
-
HTML email signature in Gmail
How to add a HTML signature in Gmail, without any text-decoration for links
-
DIV align bottom right (or left!)
Find out how to align a DIV to the bottom left or right.
-
Website Dimensions and Designing for the Web
What browser size should you design your website. Find out more.
-
Root Path and Configuration of your Website using php
Display the root path and configuration of your website by uploading a php file to your website.
-
HTML email signature in Zoho Mail
How to add a HTML signature in Zoho Mail. A very easy and stable solution.
-
FREE EU Cookie Law Script
If you haven’t already implemented the changes then we’ve put together a little bit of code to help you.
-
Remove the shadow from Mac Screen Grabs
How to remove the shadow from Apple Screengrabs.
-
10 Useful Sites for Web Developers
Some useful websites for web developers.
-
3 FREE Apps to protect your PC
A few free apps to help you protect your PC.
-
Web Browsing Tips #1: Find in Page
Find copy in page in a web page.
Using wp_strip_all_tags you can get rid of all html tags including , and etc
https://developer.wordpress.org/reference/functions/wp_strip_all_tags/
wp_strip_all_tags(category_description());
Great, works like a charm! Thank you for sharing this insight!
hi,
how to remove p tags from category description woocommerce?
not work “remove_filter(‘term_description’,’wpautop’);”
thanks
Yes it does. Just tested myself once again. You need to add this to your functions.php file. If you are using a custom theme then please check with the theme developer.
Awesome, Working like a charm 🙂 Thank you
Pleased it’s still working 🙂
Awesome. EZPZ.
Too bad no one will ever know why it comes wrapped by default
Thanks guys, way to keep it nice and simple. 🙂