Home / functions.php / Strip HTML tags from the_terms
  • How to Strip HTML tags from the_terms


    Adding this snippet to the functions.php of your wordpress theme will strip html from the_terms.

    ( click code to copy )

    wordpress snippet : PHP

    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);

    ( WordPress codex functions, hooks, in this snippet. )

    the_terms, add_filter,