Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.