Forums

Kubrick: Theme Options overriding custom header (4 posts)

  1. drogheda
    Member
    Posted 6 years ago #

    Greetings,

    Problem:
    I changed the header colors in the "Current Theme Options" menu and my custom header image no longer displays.

    Site: http://www.theplacebo.net if you're curious

    Attempts to resolve:
    Perused themes/default/ files, but could not find any changed code. Searched wordpress support and found one unresolved entry, from November 2005, related to this problem (Note the topic number): http://mu.wordpress.org/forums/topic/666 Googled to no avail. Thought about reinstalling, but would really rather know the whys and hows.

    Background:
    I just installed WP 2.0 for a non-profit org that unexpectedly lost their site. Because the new site needed to be up ASAP, I went with the Default theme (Kubrick) and just altered or replaced the images, most noticeably the header image. I've not activated any plug-ins and have made only minor changes in header.php, sidebar.php, and style.css.

    Everything was working splendidly when I decided to play around with the "Current Theme Options". Why? a) because, apparently, I'm an idiot and b) I was, wrongly, thinking of the "Revert" button as more of a "return to default settings" button. All of the Kubrick files were non-writable (permissions: 644) at the time of the change.

    More information available, of course, upon request. Thank you kindly in advance for any assistance.

  2. drogheda
    Member
    Posted 6 years ago #

    I wouldn't call this resolved, but I have a temporary goofy fix in place: through viewing source, I found out that header-img.php in the themes/default/images folder is responsible for the image overlay produced when one uses the Theme Options panel for Kubrick. (Knowing that, I still couldn't find useful info in the codex, wp support forums, or by googling.)Since deleting header-img.php does nothing and I don't know where the image overlay data is stored, I just removed the not(!) from the if statement at the beginning of the script, thus causing the script to die and default to my custom header image.

    if ( function_exists('imagecreatefromjpeg') )
    die(header("Location: placebo_wpheader.gif"));

    This is obviously a kludge and if anyone has a real solution, I'd like to hear it. I'll revisit the problem when I'm over this evil headcold and maybe it'll make more sense then.

  3. argraff
    Member
    Posted 5 years ago #

    Taking out the 'not' statement worked for me. And with all of the frustrations of WP, I don't really care why anymore.

  4. devoslack
    Member
    Posted 5 years ago #

    To override the custom Kubrick colors do the following:

    go to your functions.php file and towards the top you should see the following code:

    function kubrick_head() {
    $head = "<style type='text/css'>\n<!--";
    $output = '';
    if ( kubrick_header_image() ) {
    $url = kubrick_header_image_url() ;
    $output .= "#header { background: url('$url') no-repeat bottom center; }\n";
    }

    Simply add this statement: kubrick_header_image()
    Inbetween the quotes in: $output = '';

    The output line should now look like this: $output = 'kubrick_header_image()';

    And that's it! Save and view your custom header image.

    I was reading this post and figured that the custom colors was definitely the issue, so I hovered my mouse over the Header Image and Color link in the Dashboard and saw it lead to the functions.php file, so I decided to play in there and blam!

    Have fun with your customer headers!!!

Topic Closed

This topic has been closed to new replies.

About this Topic