X

Strip HTML Tags From the Terms

Snippets by IsItWP

Sometimes you don’t need HTML tags and only want the plain text. You can completely strip HTML tags from the_terms.

Instructions: Add the following code to the functions.php file of your WordPress theme.

add_filter('the_terms', 'the_terms_function_filter',10,5);
function the_terms_function_filter($term_list, $taxonomy, $before, $sep, $after){
     return strip_tags($them_list);
}

You may also enjoy using HTML5 figure and caption elements in WordPress.

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!
[60% OFF Today!]
[60% OFF Today!]
[10% OFF Today!]
[10% OFF Today!]
[50% OFF Today!]
[50% OFF Today!]