Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   image in horizontal bar; and rotate header image based on time (http://forum.bytesforall.com/showthread.php?t=18523)

SiaRa Sep 30, 2012 11:49 AM

image in horizontal bar; and rotate header image based on time
 
Hi all,
I got 2 questions.

1: Is it possible to put an image in a horizontal bar and if so, how do I do that?

2: I'd like to rotate my header image based on time. I.e.: from 7AM - 6PM I want to show the one image and from 6PM to 7AM I want to show the other image. Is that possible and if so, how do I do that?

Any help would be much appreciated!

juggledad Sep 30, 2012 02:28 PM

Quote:

1: Is it possible to put an image in a horizontal bar and if so, how do I do that?
yes, search the forums
Quote:

2: I'd like to rotate my header image based on time. I.e.: from 7AM - 6PM I want to show the one image and from 6PM to 7AM I want to show the other image. Is that possible and if so, how do I do that?
probably, you would have to edit the jscript and change the code. Please share the code you come up with for others to use.

SiaRa Oct 7, 2012 12:49 PM

well, as for my 2nd question.
I've got some code now, but I do not know where to insert it in the bfa_header_config.php file.
Could you please help me with that?

PHP Code:

 <?php

date_default_timezone_set
("CET"); // Dutch time


$hour date"H" ); // Take current hour to put into a variable.

if ( $hour >= && $hour <= )
{
    
// if it's between 0h00 and 5h59
    
?>
    <img src="http://domain.com/img/0h.png" />
    <?php
}
elseif ( 
$hour >= && $hour <= 11 )
{
    
// if it's between 6h00 and 11h59
    
?>
    <img src="http://domain.com/img/6h.png" />
    <?php
}
elseif ( 
$hour >= 12 && $hour <= 17 )
{
    
// if it's between 12h00 and 17h59
    
?>
    <img src="http://domain.com/img/12h.png" />
    <?php
}
elseif ( 
$hour >= 18 && $hour <= 23 )
{
    
// if it's between 18h00 and 23h59
    
?>
    <img src="http://domain.com/img/18h.png" />
    <?php
}
else
{
    
// if it's none of the above; whenever that will happen...
    
?>
    <img src="http://domain.com/img/default.png" />
    <?php

}
?>


juggledad Oct 8, 2012 04:16 AM

you need to put it in bfa_header_config.php - search for "%image' and that is the area it goes


All times are GMT -6. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.