Forums

flash on home page but other images on other pages? (3 posts)

  1. tanicos2
    Member
    Posted 4 years ago #

    i use wp as a cms now and i would like to display a flash movie on the home page and static images on other pages...as i must put all this in the header i would need some rules using the post_id i guess...i can't use css files for the flash movie so any help would be appreciated...something like...if home page...then flash...if page_id2 for example then that image...or something like that..thanks

  2. tanicos2
    Member
    Posted 4 years ago #

    i found this solution

    <div id="<?php
    if (is_page(1)) {
    echo 'style1';
    } else if (is_page(2)) {
    echo 'style2';
    } else if (is_page(3)) {
    ... and so on ...
    }
    ?>"> whatever </div>

    here
    http://wordpress.org/support/topic/207744
    but it's with Css files...can i add the echo for an html file where i can put the flash code for example?

  3. tanicos2
    Member
    Posted 4 years ago #

    omg..i did it myself..boy i'm a genius:)
    here is the trick
    on header.php...depending where you want it to appear

    <?php if (is_page('11')) { ?> 
    
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="960" height="303" id="flash" align="middle">
    	<param name="allowScriptAccess" value="sameDomain" />
    	<param name="allowFullScreen" value="false" />
    	<param name="movie" value="/wp-content/themes/.../flash.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#f4f0df" />	<embed src="/wp-content/themes/.../flash.swf" quality="high" wmode="transparent" bgcolor="#f4f0df" width="960" height="303" name="flash" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    	</object>
    
          <?php } else if (is_page('18')) { ?> 
    
          <img src="/wp-content/themes/.../images/culturaltour.jpg" alt="Image for the Single Post Pages" /> 
    
          <?php } else if (is_page('18')) { ?> 
    
           <img src="/wp-content/themes/.../images/adventure.jpg" alt="Image for the Single Post Pages" /> 
    
          <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic