For a recent project, I wanted to display a flash movie on the homepage only. I did not want it to appear on the inner pages, and simply wanted a static image in it’s place. It turns out, this isn’t the most covered topic out there so I thought I would give a quick cut and paste lesson.
To begin, I should mention that I’m using the Thematic framework for WordPress and will be pasting the full code that should be inserted into the functions.php file. I should also mention that the bulk of this code was lifted from the forums at Themeshaper, and the only part I modified was the conditional statement that calls the flash on the homepage and the static image on the rest of the site.
/* ********************************************** */
//Add swfobject script in head and flash video to header
/* ********************************************** */
function remove_certain_things() {
remove_action('thematic_header','thematic_brandingopen',1);
remove_action('thematic_header','thematic_blogtitle',3);
remove_action('thematic_header','thematic_blogdescription',5);
remove_action('thematic_header','thematic_brandingclose',7);
}
add_action('init', 'remove_certain_things');
// Add a swf where the img header is
function my_swf_code() {?>
//Show the static header image
Show something different!
No related posts.




Comments are closed.