• I moved today from a WordPress.com blog to a self-hosted blog. When I did this, I lost the Custom Headers capability that my theme (Piano Black) had. I’d like a random image from my header library each time the page reloads. I’m attempting to use Dynamic Headers to make this happen.

    Dynamic Headers generates a $dynamic_header_url tag that I can use in header.php, but I’m not superb with PHP and I’m not sure how to insert it. How would I insert this so it works?

    Piano Black has a theme option to use a custom header. It assumes that the header image has the blog name and whatever on it, so when that option is enabled it does not show the name and tagline. I would like the name and tagline to be shown but I would like to use the random images.

    Appropriate snippets of code are below.

    This is the part of Piano Black that controls the logo.

    <div id="header">
    
       <?php if ($options['use_logo']) : ?>
       <div id="logo_image">
        <h1><a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('template_url'); ?>/img/<?php echo $options['logo_name']; ?>" title="<?php bloginfo('name'); ?>" alt="<?php bloginfo('name'); ?>" /></a></h1>
       </div>
       <?php else : ?>
       <div id="logo">
        <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
        <h1><?php bloginfo('description'); ?></h1>
       </div>
       <?php endif; ?>

    This was placed into header.php to generate the $dynamic_header_url tag.

    <?php if(function_exists('dh_get_page_image_url')){ $dynamic_header_url = dh_get_page_image_url(); } ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Header on Self-hosted Installation’ is closed to new replies.