WordPress.org

Ready to get started?Download WordPress

Forums

On Click random header image (2 posts)

  1. jonnyburch
    Member
    Posted 5 years ago #

    I know I'm probably being a thicky but I can't figure out how to make my (already random) header image randomise also when clicked.

    here is my header code for it:

    <?php
    $randomnumber = rand(1,3);
    ?>
    <div id="header">
    	<div id="headerimg">
    <img id="blog-title" src="http://.../sszheader<?php print $randomnumber; ?>.jpg" alt="GO" />
    	</div>

    I need this same image to also be a link to randomise itself using the predefined 'sszheader(randomnumber)' variable.

    thanks
    jonny

  2. dinneenp
    Member
    Posted 5 years ago #

    I'm looking for slightly easier- I just want RANDOM word that'l link to random page.
    Currently I have added in previous and next in the header:

    '

  3. <?php previous_post('%', 'PREVIOUS ', 'no'); ?>
  4. <?php next_post('%',' NEXT', 'no'); ?>
  5. '

    Any help?
    Thanks,
    Patrick.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags