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.
-
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.
-
Web Browsing Tips #2: Tabbed Windows
Using tabbed windows in your web browser.
-
Web Browsing Tips #3: Keyboard Shortcuts
Some web browsing keyboard shortcuts.
-
Redirect your site the Search Engine Friendly way
Using a 301 redirect is important when you change your website URL or web page URL.
-
Remove the WordPress Meta Tag from your Blog
Remove the WordPress meta tag from your WordPress site with this small function.
-
Stay secure, use more than one password
We need passwords for everything, but how can we stay secure and have multiple passwords without having to remember them all.
-
Forward your emails to one address
Find out how, using cPanel, you can forward your emails to one email address.
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. 🙂