Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Embed SWF in Your WordPress Posts

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Embed SWF in Your WordPress Posts

If you have ever tried embedding a Shockwave Flash file into your WordPress blog then you know it can get messy. Besides, if you are hosting your blog on then you are not going to be able to upload flash for security reasons. If you do have your hosting account, however, then there are several ways you can go about uploading .swf files to your WordPress blog posts. The first way involves using a plugin. This way is preferred if you are not good with code. The other way requires you to know some basic html. In this article we are going to go over how to embed SWF in WordPress posts with a plugin and without a plugin.

Plugin Method

First, you need to download and install Easy Flash Embed for WordPress. This plugin is so simple that no settings are even added to your admin menu. All you have to do is used a shortcode when you are creating your posts like this:

[swf src="" width=300 height=100]

Simply replace the src attribute with a link to your flash file and adjust height and width accordingly.

Download Easy Flash Embed plugin.

Code Method

For those of you who would like more control over your code we are now going to show you how to embed flash files directly into your WordPress posts, pages, or even themes. Although people have come up with numerous methods for doing this over the years the easiest and most standards compliant way is to use the <object> element.

The final code looks like this:

<object id="flashcontent" 
  <param name="movie" value="mymovie.swf" />
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" 
      Fallback or 'alternate' content goes here.
      This content will only be visible if the SWF fails to load.
  <!--[if !IE]>-->

Note that you are using 2 <object> elements. The outer element is targeting Internet Explorer while the inner element is for all the other browsers. You can change your fallback text if necessary. You can also add extra <param> options like wmode or allowScriptAccess.

P.S. you should always use wmode=transparent, so your embed doesn’t override existing content such as a floating bar. Check out our article on how to prevent Youtube oEmbed from overriding content.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. pradeep says:

    Hi i am using this plugin, but the problem is that. when i open the page in chrome everything is good.but in firefox not showing anything

  2. Marjan Trajkovski says:

    Thanks for the tutorial how to embed Flash banners in wordpress.

  3. jish says:

    that last comment should say: I had to wrap my code in pre tags to prevent WordPress from formatting it (and thus breaking it).

  4. Abdallah Hussien says:

    It’s not working on IE8 and IE9

    • m3nda says:

      Iframing does, for sure. Just need for a browser… Iframe is easy to code and fully compatible. I don’t know why is not the popular way. I do it also with PDF files…

  5. yomi says:

    hi all,

    i have a difficulty embedding any flash with any plugins for that matter, into my widget in my website, header..

    any suggestions will be welcome


    • m3nda says:

      If you do not explain wich is that difficulty we cannot figure a solution for you. I guess you’re using a plugin funcion over another plugin funcion. Like “use shortcode in a widget to call swf and call that widget with another shortocode”. When you play around widgets and functions some thins are missing, but you can add it later, always.

  6. Gregg Baron says:

    The plugin worked perfectly. Thanks,

  7. Sheila says:

    I checked on this plugin and was disappointed to find that it is over two years old and is no longer in use with WordPress. In fact it is incompatible….this is disappointing.

  8. Jeff Foliage says:

    You code worked perfectly. I had been trying to get the swf movie to load and play when someone comes to the page and your code was the first to work. You might edit or put a version of the code with out the numbers so newbies know not to leave them in.

    But thank you.
    Jeff “Foliage” Folger

  9. haseeb says:

    awesome bro love it

  10. marzepani says:

    you should use
    if you don’t need transparency.
    it’s much faster and has the same effect to “overlapping”.

  11. Chris says:

    It’s 2012… no one should be embedding Flash into their WordPress site, or any website for that matter!

    • Jahanzeb Khan says:

      Oh please, what if I made a flash animation and wanted to embed that? Or something just for fun. I’ll agree flash isn’t that good, but no reason to hate it that much. It’s hardly useful, but still fun.
      I find drawing everyday vectors/cartoons much easier on flash than photoshop.

    • Edouard Artus says:

      What ?! So because we’re in 2012 people shouldn’t post animations they’ve made with flash into the web for example ?

    • Scarab13 says:

      dude where do you live? every big company invests millions in serving flash banners in 3 standard sizes. Actually I am just working on one of them now. Do some research.

  12. Gautam Doddamani says:

    hmm i never really tried to embed flash in my posts…but never the less i will bookmark this for future use…i mostly use youtube to show off my videos..thanks for d tut!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.