• Is there any way to add html to categories? There used to be a plug in to do it called HTML Category Descriptions but it doesn’t work anymore. There is also a lot of posts online that speak about disabling wordpress filters to make this possible. I have disabled all the wordpress stripping filters and I still can’t put html into my categories. How do I do this?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    put this in your theme’s functions.php

    $filters = array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description');
    foreach ( $filters as $filter ) {
        remove_filter($filter, 'wp_filter_kses');
    }
    
    foreach ( array( 'term_description' ) as $filter ) {
        remove_filter( $filter, 'wp_kses_data' );
    }

    Thread Starter jhansensd

    (@jhansensd)

    I did that and it does not work. The tag gets stripped out:

    <img style=’margin-left: -1px;’ src=”/wp-content/themes/apppress/images/icons/blog-small.png” alt=”Blog” /><p id=’articles’>

    Moderator keesiemeijer

    (@keesiemeijer)

    I’m on wordpress 3.0.1 as well and it works so maybe some plugins are not playing nice. deactivate all plugins to see if this resolves the problem? Or try if this will help any, put “pre_category_description” in the filters array like so:

    $filters = array('pre_category_description', 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description');

    It works for me with and without the “pre_category_description”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML in Category Descriptions?’ is closed to new replies.