Forums

Multiple Headers (5 posts)

  1. gray929
    Member
    Posted 3 years ago #

    Hey,

    How can I get multiple headers/banners for my WordPress blog? Do I have to adjust the header.php? I have three banners I wish to rotate. . .

    Thanks!

  2. t31os
    Member
    Posted 3 years ago #

    You could make a basic script to display 1 of 3 images for example....

    Something like...

    <?php
    $rand_banner = rand(1, 3); // Grab a random number from 1 to 3...
    if($rand_banner == 1) { // If number is 1 ?>
    HTML Code for first image here
    <?php } elseif($rand_banner == 2) { // If number is 2 ?>
    HTML Code for second image here
    <?php } elseif($rand_banner == 3) { // If number is 3 ?>
    HTML Code for third image here
    <?php } ?>
  3. gray929
    Member
    Posted 3 years ago #

    alright, thank you. would i add that into my header.php? would I replace it with any current banner snippet?

    thanks

  4. gray929
    Member
    Posted 3 years ago #

    any help? ty

  5. lenashore
    Member
    Posted 3 years ago #

    I found an answer to multiple images! Look at this brilliant plug in. Works like a charm on 2.7. I don't see a way to make it rotate - but you can assign different images to different pages!
    http://wordpress.org/extend/plugins/add-your-own-headers/

    (:

Topic Closed

This topic has been closed to new replies.

About this Topic