Support » Fixing WordPress » embed code disappears in visual

  • There were other topics on this. When I embed a image or video, the script disappears whenever you switch to visual. If I stay in html and update the page, it works fine. Thee issue I have is if I return to the page and then go to visual to work on some other part of the page, bang, the embedded code disappears.

    The code I am embedding is :

    <div id=”sv_6296″ style=”width: 200px; height: 200px;”>Flight Planning at</div><script src=”,-122.37487023004412&s=3&c=sv_6296&i=127″ type=”text/javascript”></script>

    If at any time during a page update I jump to visual, the script portion of this code

    <script src=”,-122.37487023004412&s=3&c=sv_6296&i=127″ type=”text/javascript”></script>

    is removed by wordpress. I get that I should stay in html mode to originally place this, what I need to know is how to not have to replace this every dang time I go back to update or change the page.

    This is so annoying. I love wordpress, but this one issue makes no sense to me.

    Can anyone tell me if there is a plugin or any way to tweak this issue out?


Viewing 1 replies (of 1 total)
  • Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    When I embed a image or video, the script disappears whenever you switch to visual.

    Yes. If you use the Visual Editor it will almost all of the time mung any inserted by hand HTML code. It does that, it’s just not meant for hand coded HTML like that.

    The HTML tab is for making small HTML adjustments but insert a div or script like that and well, you know what happens.
    It’s the Visual Editor that’s giving you grief. If you keep using it for inserting raw HTML (even using the HTML tab) then you’ll keep getting frustrated.

    Copying from an earlier response:

    That editor is good for something like 99% of the user base but it will mung any HTML that you try to insert by hand. The HTML tab really is for making small adjustments.

    You can disable it for your account on your WordPress installation.


    Check on ‘Disable the visual editor when writing’.

    Or you can insert that HTML code via a shortcode but you’ll need to write the PHP that functionality into a plugin or your theme’s functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘embed code disappears in visual’ is closed to new replies.