2003? That’s pretty old code! You should be able to display a rotating header image using CSS mixed with a little PHP. Try downloading the Seasons theme which the CSS/PHP approach to change the complete color theme based on the current month. The file you might want to have a look at is seasons-css.php. Might give you some ideas…
I took a look at the Seasons theme and the seasons-css.php; though lovely I’m not sure I need something extensive as a .css. While changing the whole page’s look is neat, I just want the header image to change with each page refreshment. I’m pretty sure I could get away with just a php coding, but my problem is I’m not sure in Kubric how or where to install something like that.
Indeed, the rotator.php is pretty old, but I liked what it claimed as functionality- I could have a folder with the various images and not have to separately code each one; the php would rotate them automatically by virtue of being in the shared folder. Is there anything similar around today?
I’ll give these two a try and see if they work. Thanks!
Ok, I successfully loaded the wordpress dynamic-headers plug in and it’s properly installed; I pasted the code into my header.php and just deleted the header-image.php as I’d already blocked out nearly everything on it, and yet, the image still doesn’t show up! I am suspecting my background is somehow going up to the top of the page and blocking it. Is that even possible?
HOORAY! I got the dynamic image generator to work at the top of my page. However now there’s another bit of weirdness- it looks like there’s an invisible header between the dynamic header and the posts. Do I need to remove some code? Also for anyone else using the dynamic image header in Kubrick, I put my code here in the header.php”
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page">
<?php show_media_header(); ?>
<div id="header" role="banner">
<div id="headerimg">
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
</div>
</div>
<hr />
It’s your old header. Since you’re not using it for anything now, try adding display:none; to:
#header {
height:200px;
margin:0 0 0 1px;
padding:0;
width:758px;
}
in style.css
Radical! Worked like a charm! Many thanks.
Just a quick update to anyone else using the dynamic image generator- here’s where you put the code so you don’t have to ‘delete’ your old header; it goes at the bottom of the php:
<div id="header" role="banner">
<div id="headerimg">
<?php show_media_header(); ?>
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
</div>
</div>
<hr />
rareborealis:
Thanks for posting that. I’ve got the plugin working fine except when I refresh to show a new random header I see the default Kubrick BLUE BLOB for a second or two as the image changing/rotates. I know it’s the default theme but I’ve been unable to figure out where to code so as to make that blue blob stop “dripping” on the page between image changes.
I’ve tried putting display:none in various parts of the Kubrick CSS file AND in the header.php file(commenting things out, etc.) and nothing prevents the blue blob from showing in-between refreshes, albeit briefly. It’s driving me nuts. I’ve also tried putting in #fff (white) and nothing will stop the blue blob!
Ideas? Anyone? Probably something simple but I just can’t seem to figure it out.
Thanks for any help!
assuming that the blue blob comes from ‘kubrickheader.jpg’, use a graphic editor and edit it into a color you can live with.
Yeah I could do that. Just thought there might be a more graceful (code) way to handle it (display:none;).
Update: I did that (changed image to all white leaving borders and shading, etc.) and it’s better (not showing the blob on EVERY rotation) but I still see it once in a while, which means it’s getting the color from somewhere else, I think, too.
Update to the update: Found a place where the Kubrick default blue was still in place: Appearance — Custom Header — Advanced —
Changed default colors (“upper” color and “lower” color) to #ffffff. All better now. Leaving this here in case anyone else comes along someday wondering WTH to try.