WordPress.org

Support

Support » How-To and Troubleshooting » On Click random header image

On Click random header image

  • 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

Viewing 1 replies (of 1 total)
  • 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:

  • <?php previous_post(‘%’, ‘PREVIOUS ‘, ‘no’); ?>
  • <?php next_post(‘%’,’ NEXT’, ‘no’); ?>
  • Any help?
    Thanks,
    Patrick.

Viewing 1 replies (of 1 total)
  • The topic ‘On Click random header image’ is closed to new replies.
Skip to toolbar