Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Wordpress embed

I am researchign best practices for embedding files like .swf and flv in wordpress.

3 Answers

Mark Flavin
Mark Flavin
10,199 Points

Are you looking for a plugin or tool? Or are you asking how to do it via the wp-editor or via your own code?

Code is fine - I haven't tried yet - but I have a number of flash banners and videos (.flv and .swf) I want to show off in my wordpress portfolio.

I can add swf to my server or import to the /uploads (media library) so that's cool - I used a plug-in to allow files to be added to the media library from the server and I edited the functions.php to allow .swf uploads (also to the media library).

I thought the easiest way is to upload all my .swf files to a directory /uploads and use an absolute path in the embed code. In the past I have had issues with relative paths and javacript/sourcing .flv files.

1) Is there a native video player in WP) 2) Is there a short code/embed code I can use?

so I'm putting my embed code inside the "code" tag and it seems to work fine. I'm pleased because I didn't know what html/css was allowed (some code works?), and now it doesn't matter.