Embed Flash files in WordPress

While developing a site for a client a need emerged for us to be able to embed Flash files in the content.

To do so you could paste some HTML in the content editor and hope for it not to be parsed away. And to keep it the HTML or XHTML  valid while doing so, and to support alternative content might be a bit tricky.

I thought that I would fix this problem using the Shortcode API, and also to make a plugin out of it while I was at it.

The result is Easy Flash Embed!

Embed Flash easily and standard compliant with SWFObject using only a [swf] shortcode!

In the text editor simply write something like:

[swf src="http://www.example.com/my-flash-file.swf" width=300 height=100]

You can even add some alternative content by writing something between the brackets:

[swf src="http://www.example.com/my-flash-file.swf" width=300 height=100]You must have Flash to view this file[/swf]

Read more about it or download it right now!

Advertisements
About

Web Developer @ Oakwood Creative - www.oakwood.se

Tagged with: , , , ,
Posted in Beginner
5 comments on “Embed Flash files in WordPress
  1. […] Embed Flash files in WordPress « WordPress Quick Tips […]

  2. […] Embed Flash files in WordPress « WordPress Quick Tips […]

  3. […] Embed Flash files in WordPress March 2010 2 comments 4 […]

  4. vaughan says:

    Thanks so much you rock.. Worked perfectly.

  5. Does it still work with the latest WordPress version? It doesn’t display anymore since we upgraded.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

About

WordPress Quick Tips is a blog supplying great tips about WordPress.

We hope to create a great knowledge resource for WordPress developers as well as serving a reminder for all the forgetful ones.

The blog is created and run by Vincent of Oakwood Creative

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 120 other followers

%d bloggers like this: