WordPress turns HTML code to HTML entities

I created a new wordpress page and added this into the text editor window:

<div></div>

When I click Publish, the code turns into this:

&lt;div&gt;&lt;/div&gt;

How do I stop it from doing that?? The website displays the code like text and not HTML, so you literally see “<div></div>” on the page. I even tried adding a replace script into the functions.php file and it didn’t work:

function my_content_filter( $content ) {
$new_content = str_replace(‘&gt;’,’>’,$content);
return $new_content;
}
add_filter( ‘the_content’, ‘my_content_filter’, 1 );

Read more here:: WordPress turns HTML code to HTML entities

Leave a Reply

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