Stop wordpress removing html

Stop WordPress removing HTML. Add the bellow code on your functions.php

 * Stop tiny_mce removing html
if ( ! function_exists( 'ns_override_mce_options' ) ) {
function ns_override_mce_options( $initArray ) {
    $opts = '*[*]';
    $initArray[ 'valid_elements' ] = $opts;
    $initArray[ 'extended_valid_elements' ] = $opts;
    return $initArray;
add_filter( 'tiny_mce_before_init', 'ns_override_mce_options' );



Hi, I'm a Freelance Web Developer and WordPress Expert based in London with a wealth of website development and support experience. I am great at problem solving and developing quick solutions.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


    Fill in the form below to make an enquiry or find my contact details on my contact page.

  • Hidden
  • This field is for validation purposes and should be left unchanged.