Support » Fixing WordPress » Inserting a header image PHP

  • Hey, Thanks for taking a look

    I am looking to insert a header image into my theme.(As well as make it random;
    <img src=”http://path_to_images/headerimage_<?php echo(rand(1,3)); ?>.gif”
    width=”image_width” height=”image_height” alt=”image_alt_text” />)

    I am wondering how to do this, as well as the best place to store the header image file in my database.

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    <html xmlns=”http://www.w3.org/1999/xhtml” <?php language_attributes() ?>>
    <head profile=”http://gmpg.org/xfn/11″>
    <title><?php bloginfo(‘name’); if ( is_404() ) : _e(‘ » ‘, ‘sandbox’); _e(‘Not Found’, ‘sandbox’); elseif ( is_home() ) : _e(‘ » ‘, ‘sandbox’); bloginfo(‘description’); else : wp_title(); endif; ?></title>
    <meta http-equiv=”content-type” content=”<?php bloginfo(‘html_type’) ?>; charset=<?php bloginfo(‘charset’) ?>” />
    <meta name=”description” content=”<?php bloginfo(‘description’) ?>” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’) ?>” /><!– Please leave for stats –>

    <link rel=”alternate” type=”application/rss+xml” href=”<?php bloginfo(‘rss2_url’) ?>” title=”<?php echo wp_specialchars(get_bloginfo(‘name’), 1) ?> <?php _e(‘Posts RSS feed’, ‘sandbox’); ?>” />
    <link rel=”alternate” type=”application/rss+xml” href=”<?php bloginfo(‘comments_rss2_url’) ?>” title=”<?php echo wp_specialchars(get_bloginfo(‘name’), 1) ?> <?php _e(‘Comments RSS feed’, ‘sandbox’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’) ?>” />

    <!– for reset/generic csss –>
    <style type=”text/css” media=”all”> @import url(<?php bloginfo(‘template_url’); ?>/css/reset.css); @import url(<?php bloginfo(‘template_url’); ?>/css/generic.css); </style>
    <style type=”text/css” media=”print”> @import url(<?php bloginfo(‘template_url’); ?>/css/print.css); </style>
    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘stylesheet_url’); ?>” />
    <!–[if lt IE 8]>
    <style type=”text/css” media=”all”> @import url(<?php bloginfo(‘template_url’); ?>/css/ie.css); </style>
    <script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js” type=”text/javascript”></script>
    <![endif]–>

    <?php wp_head() ?>

    </head>

    <body class=”<?php sandbox_body_class() ?>”>

    <div id=”wrapper” class=”hfeed”>

    <div id=”header”>
    <h1 id=”blog-title”>/” title=”<?php bloginfo(‘name’) ?>” rel=”home”><?php bloginfo(‘name’); ?></h1>
    <div id=”blog-description”><?php bloginfo(‘description’) ?></div>
    </div><!– #header –>

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inserting a header image PHP’ is closed to new replies.