• Hello,

    I try to add <iframe> in category description but nothing is displayed.

    I have added some code in funcitons.php to prevent wp that strip html :
    /**
    * Allow HTML in term (category, tag) descriptions
    */
    foreach ( array( ‘pre_term_description’ ) as $filter ) {
    remove_filter( $filter, ‘wp_filter_kses’ );
    if ( ! current_user_can( ‘unfiltered_html’ ) ) {
    add_filter( $filter, ‘wp_filter_post_kses’ );
    }
    }

    foreach ( array( ‘term_description’ ) as $filter ) {
    remove_filter( $filter, ‘wp_kses_data’ );
    }

    But it is not worling.
    Could you tell me how to show iframe in catagory description ?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @angangba,

    The following should do it:

    remove_filter( 'pre_term_description', 'wp_filter_kses' );

    Keep in mind that the content filter is included for good security reasons though. I would recommend you to find another solution, if possible.

    — Anders

    • This reply was modified 4 years, 2 months ago by Anders Norén.
    Thread Starter angang

    (@angangba)

    Thank you very much Anders.
    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘category description and iframe’ is closed to new replies.