WordPress.org

Ready to get started?Download WordPress

Forums

custom header image - division by zero (3 posts)

  1. charles_i
    Member
    Posted 4 years ago #

    Every time I try to upload a custom image I get a "division by zero" error message but the image uploads successfully into the library. Can someone tell me what the problem is with the code?

    Thanks
    Charles

  2. Daynah
    Member
    Posted 4 years ago #

    What theme are you using? What plugins are turned on? Could you be more specific?

  3. charles_i
    Member
    Posted 4 years ago #

    I'm trying to make my own theme. I've used the header code from the "Classic" theme and this in functions:

    define('header_image', '%s/images/header.jpg');
    define('header_width', 576);
    define('header_height', 131);

    function header_style() { ?>
    <style type="text/css">
    #wp_header {
    background: url(<?php header_image(); ?>) 0 0 no-repeat;
    height: <?php echo header_height; ?>px;
    width: <?php echo header_width; ?>px;
    }
    </style>
    <?php }
    function header_style() { ?>
    <style type="text/css">
    #wp_header {
    background: url(<?php header_image(); ?>) 0 0 no-repeat;
    height: <?php echo header_height; ?>px;
    width: <?php echo header_width; ?>px;
    }
    </style>
    <?php }

    Trying to make it as simple as I can.

Topic Closed

This topic has been closed to new replies.

About this Topic