• Hi!!! I LOVE this theme. Elegant and simple but VERY user friendly and customizable. One small problem, I can’t figure out how to upload my custom header. Please advise?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The upload of a picture for a custom header is not yet implemented, It will be available in 0.9 version soon this week.

    By now, you can set a custom header by writing and activating a custom plugin. Here is an example how to do it. Copy this code in a php file, setting on it the URL to your image (in the #header line), and upload to your plugins folder. Activate it and it is done!

    <?php
    /*
    Plugin Name:   My Custom Header
    Plugin URI:    https://alkivia.org/chameleon
    Description:   Custom header for chameleon theme.
    Version:       1.0
    Author:        Your name
    Author URI:    https://alkivia.org
    */
    
    function my_theme_header ( $header ) {
    
    	return '';
    }
    add_filter('chameleon_header', 'my_theme_header');
    
    function my_custom_header() {
        echo "<style type='text/css'>
            #header { background: url('https://alkivia.org/images/head.jpg'); }
        </style>";
    }
    add_action('wp_head', 'my_custom_header');
    
    ?>

    As said, uploading the image will be available in 0.9 version this week. Just consider the default image size is 970×120 pixels.

    Sorry for the inconvenience to have to do it that way by now.

    Thread Starter Thornesworld

    (@thornesworld)

    Hi again! Thank you so much, but I believe I have followed your instructions and am getting the following error message upon activating the plugin:

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /misc/28/324/050/332/4/user/web/test.hartjoy.com/wp-content/plugins/mycustomheader.php on line 7

    Please advise?

    Thread Starter Thornesworld

    (@thornesworld)

    Woops. It had all these, too:

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /misc/28/324/050/332/4/user/web/test.hartjoy.com/wp-content/plugins/mycustomheader.php on line 15
    
    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /misc/28/324/050/332/4/user/web/test.hartjoy.com/wp-content/plugins/mycustomheader.php on line 16
    
    Parse error: syntax error, unexpected T_FUNCTION in /misc/28/324/050/332/4/user/web/test.hartjoy.com/wp-content/plugins/mycustomheader.php on line 17

    Woops. Perhaps is a sintax error in that I wrote, as I did it late at night.

    By now deactivate the custom plugin and I will check it this afternoon, and give you the correct code ??

    Thread Starter Thornesworld

    (@thornesworld)

    Thank you so much!!! I will be so pleased. Also, may I edit one of the red.css files to change the colors to my own choice and if I keep the name, “red”, the styles.css should still call it up, yes?

    Yes, you can change the colors in any CSS files and it will show up if you refresh your browser.

    I would recommend to save it as a new name for two reasons (new name must be all lowercase):

    1) You still have the red palette if you want to use it.
    2) You will not overwrite your palette file when uploading a new theme version. (Of course, you have to save a backup on your computer). The palette would be overwritten only if I create a new palette with the same name ??

    About the custom header, an upload functionality will be in place soon. I will finish this weekend and just will have to wait for WordPress approval to have it online. Anyway, if you contact me via my site contact form, I will send you the custom plugin to replace it. (Tell me the URL to the picture, and sizes in pixels. (Recommended 970 pixels width and 120/130 pixels height).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Header How to, please?’ is closed to new replies.