Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter DJD_79

    (@djd_79)

    Thanks again.

    The site shows a random text now, so it’s almost ready, I think.
    The code for banner.php isn’t that long, so here it is:

    <?php
    /*
     * Name your images 1.jpg, 2.jpg etc.
     *
     * Add this line to your page where you want the images to
     * appear: <?php include "banner.php"; ?>
     */
    // Change this to the total number of images in the folder
    $total = "5";
    // Change to the type of files to use eg. .jpg or .gif
    $file_type = ".jpg";
    // Change to the location of the folder containing the images
    $image_folder = "wp-content/banner/";
    // You do not need to edit below this line
    $start = "1";
    $random = mt_rand($start, $total);
    $image_name = $random . $file_type;
    echo $image_folder . $image_name;
    ?>

    I tried to add the code for returning the string, but then only the
    picture dimple.jpg was shown.

    Why is it they’re still don’t understand each other?

    Thread Starter DJD_79

    (@djd_79)

    Oke, I’m back…

    The picture on the website is blank now, so I know it’s the right piece of code I’m dealing with.
    I’ve got this, but it’s not working the way it should be. And it’s probably me 😉

    // No CSS, just IMG call
    define('HEADER_TEXTCOLOR', '');
    define('HEADER_IMAGE', <?php include "banner.php"; ?> ; // %s is theme dir uri
    define('HEADER_IMAGE_WIDTH', 330);
    define('HEADER_IMAGE_HEIGHT', 293);
    define('NO_HEADER_TEXT', true );

    In banner.php is the code (lot’s of code to find, so thanks fot that already) but what need to be changed?

    Gr. Dennis

    Thread Starter DJD_79

    (@djd_79)

    functions.php !!
    Yes I see it, thanks alchymyth/

    // No CSS, just IMG call
    define('HEADER_TEXTCOLOR', '');
    define('HEADER_IMAGE', '%s/images/dimple.jpg'); // %s is theme dir uri
    define('HEADER_IMAGE_WIDTH', 330);
    define('HEADER_IMAGE_HEIGHT', 293);
    define('NO_HEADER_TEXT', true );

    I’ll try to change %s/images/dimple.jpg in some code to link to a php file. In the php file I want to use the code to call some images. If that works ofcourse…

    I’ll be back

Viewing 3 replies - 16 through 18 (of 18 total)