I am writing a plugin and have this code:

$settings = array("media_buttons" => false, "wpautop" => false, "teeny" => true);
wp_editor("", "viddesc", $settings);

The problem is when I paste this in wp editor:

<span class='infoTitle'>Nulla mauris justo</span>

And save it, it becomes this:

<p>&lt;span class='infoTitle'&gt;Nulla mauris justo&lt;/span&gt;</p>

Is there a away to avoid adding p tags and converting <> characters?

Thank you.

1 Answer 1


If you use Text editor, instead of Visual editor, you will add exactly the html code you wanted to add there. It has nothing to do with the PHP code you mentioned, just html from visual editor is transformed in the way you get it later (< and > and so on).

  • Ok, I see now. Is there a way to disable (remove?) visual part? Because this way it completely brakes my applications. Or maybe there is something better for me to use to paste html code and save it later.
    – Toniq
    Dec 26, 2014 at 14:58
  • Yes, in your user profile page you can totally disable visual editor.
    – vlood
    Dec 26, 2014 at 14:58
  • 1
    If you want this disabled for the rest of the users in the site, just add this in your theme's functions.php or in a new plugin: add_filter('user_can_richedit', false);
    – vlood
    Dec 26, 2014 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.