On www.buxx.nl 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?
ThemeShaper Forums » Thematic
[closed]
use Wordpress to set the header > custom header in power blog theme
(2 posts)-
Posted 10 years ago #
-
The Thematic Forums have moved to http://thematictheme.com/forums
To make it so you can use the custom header image, reference http://codex.wordpress.org/Custom_Headers
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 #
Topic Closed
This topic has been closed to new replies.