• 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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 } ?>
    Thread Starter gray929

    (@gray929)

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

    thanks

    Thread Starter gray929

    (@gray929)

    any help? ty

    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!
    https://www.ads-software.com/extend/plugins/add-your-own-headers/

    (:

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple Headers’ is closed to new replies.