Header image/flash (1 post)

  1. DmitrijsPelihs
    Posted 2 years ago #

    The site i`am working know is http://www.thpb.lv
    My theme: Twentyeleven
    My goal: In the header i need on every page appear on random images or flash movies with links to posts and on some posts display featured image.

    So Twentyelen header functionality fit but doesn't support flash.

    Now iam using this code from this forum:https://forums.digitalpoint.com/threads/script-for-random-image-or-flash-file.36767/page-2

    $imageorflash = rand(1,2);
    	If ($imageorflash == 1){
    		$random_number = rand(0,1);
    		echo '<div id="header-img"><object width="980" height="258">
    		<param name="movie" value="flash' . $random_number . '.swf">
    		<embed src="' . get_stylesheet_directory_uri() . '/images/header-img/flash' . $random_number . '.swf" width="980" height="258">
    	else {
    		$random_integer = rand(0,4); // Assumes you have images from image0 to image4
    		echo '<div id="header-img"><img src="' . get_stylesheet_directory_uri() . '/images/header-img/image', $random_integer, '.jpg"></img></div>'; //point to the correct domain/folder, this assumes .jpg but can be easily changed

    at least flash works.

    So can anyone help me to solve this riddle

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by DmitrijsPelihs
  • This topic is not resolved
  • WordPress version: 3.6.1


No tags yet.