WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Different banners for different pages. Need Help. (3 posts)

  1. Anonymous
    Unregistered
    Posted 6 years ago #

    Hi,

    Iv'e been readin through various posts trying to find a solution for having different banners on different pages. I am using the default kubrick theme.

    What i have been trying is this:

    in header.php:

    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">

    <div id="header" >
    <img src="/images/headerimg.php" alt="whatever" />
    <div id="headerimg">
    </div>
    </div>
    <hr />

    I then created a headerimg.php file and put it in the images folder, it looks like this:

    <?php
    if( is_page(22) ) {
    $img = '/images/kubrickheader.jpg';
    } else {
    $img = '/images/kubrickheader2.jpg';
    }
    ?>
    <img src="<?php echo $img; ?>" />

    finaly in styles.css it looks like this:

    #header {
    background: #73a0c5 url('/images/headerimg.php') no-repeat bottom center;
    }

    I really need help as this wont work. i have been trying to change this and that, but nothing helps.

  2. Anonymous
    Unregistered
    Posted 6 years ago #

    I have also tried to write the url of the files (http://.....)

  3. aptdesignonline
    Member
    Posted 6 years ago #

    thajaphio,

    Could you tell us how you resolved this?

Topic Closed

This topic has been closed to new replies.

About this Topic