Summary
Highlights
The video introduces the process of embedding an SWF (Flash) file into a WordPress site. The presenter uses a local WordPress installation to demonstrate replacing the default header with a Flash animation. The animation starts when the page refreshes, showcasing a simple Flash animation, with the potential for more complex ones.
The first step is to prepare an SWF file. The presenter shows his example SWF file and emphasizes matching its dimensions (width and height) to your theme's existing header, especially if replacing a header image. He uses Firefox's inspector to find the header's dimensions (940x198) as an example. Next, the SWF file is uploaded to WordPress via the Media Library (Dashboard > Media > Add New), and its URL is copied for later use.
To embed the SWF in the header, navigate to Appearance > Editor and select the `header.php` file. The existing image source code for the header is identified and removed. A provided code snippet is then pasted into its place. Crucially, the 'value' and 'source' attributes within this new code snippet must be updated with the URL of the uploaded SWF file. After updating and saving the `header.php` file, refreshing the site will display the Flash animation in the header.
The video also demonstrates how to embed the SWF file within a WordPress post. The same code snippet used for the header can be copied and pasted directly into the HTML tab of a post. After updating the post, the Flash animation will appear at the specified location within the post content. This method can also be used for widgets or sidebars.