ThemeShaper Forums » Thematic


use Wordpress to set the header > custom header in power blog theme

(2 posts)
  • Started 10 years ago by buxx
  • Latest reply from ScottNix
  • This topic is not resolved


  1. On I use the powerblog theme, and if I want another image in the header, i must edit it in de .css file.
    How can I use the 'custom header' funtion pf Wordpress to easily edit the headerimage, and even load it at random?

    Posted 10 years ago #
  2. The Thematic Forums have moved to

    To make it so you can use the custom header image, reference

    Which is basically something like this.

    $headerargs = array(
        'flex-width'    => true,
        'width'         => 960,
        'flex-height'    => true,
        'height'        => 150,
        'default-image' => get_stylesheet_directory_uri() . '/images/header.png',
    add_theme_support( 'custom-header', $headerargs );
    function childtheme_add_header_image() { ?>
    <img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />
    <?php }
    add_action('thematic_header', 'childtheme_add_header_image', 6);

    You will need to add (or make sure you already have) a /images/ folder and header.png file which would be the default. This is just an example, as far as doing "random" that depends on how it would be set up and is probably somewhat of a pain, it is up to you to figure out that. :P

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.