WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to disable the php generated header image? (17 posts)

  1. nfin1te
    Member
    Posted 5 years ago #

    Hi,

    im currently modifying the default theme here:

    http://www.dirtymoustache.net/designdirect/

    As u can see, the problem is quite obvious.
    I replaced the header image in the back with my own version, but i need to disable the php generated image above.

    First, it worked by deleting the line "<?php wp_head(); ?> " from the header.php, but unfortunately, the nexgen gallery plugin needs it (dont mind the images, it's just a test gallery), so I had to put it back.

    Can someone help me?

    thanks in advance

  2. jberghem
    Member
    Posted 5 years ago #

    That's the main reason I don't like the default theme. Most other themes don't have that kind header.

    In header.php delete these lines (13 - 24)

    <style type="text/css" media="screen">
    
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !empty($withcomments) && !is_single() ) {
    ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>
    
    </style>

    And delete the header-img.php file in the image folder.
    That should clear things up

  3. figaro
    Member
    Posted 5 years ago #

    If you are creating your header with Photoshop, then just google kubrick header psd and you will find several places where you can download the default Kubrick header psd file. Open it in Photoshop and create your custom header using that template. Then save it as the same name as the default header in kubrick (kubrickheader.jpg) and replace the default image in the theme.

    That way, you don't need to change any code and you will have a nicer looking header to use in kubrick. Optionally, you could use the Contempt theme (similiar to kubrick but allows you to upload a custom header through wp admin)...I'm using that theme here:

    http://www.georgetownprofessor.net/photoblog/

  4. nfin1te
    Member
    Posted 5 years ago #

    jberghem: When this is done, he does not call the header anymore and thus it gets not displayed, additionally, the sites layout got messed up.

    figaro: that's what i did, when you look at the top of the grey box, you should see a little arrow. This is from the image behind, which means i already replaced it.

    thanks to both, but this didn't work.
    Any more ideas?

  5. Saurus
    Member
    Posted 5 years ago #

    #header {
    background:#73A0C5 url(images/kubrickheader.jpg) no-repeat scroll center bottom;
    }

    Not entirely sure, but have you tried changing the call to kubrickheader.jpg here with your own?

  6. nfin1te
    Member
    Posted 5 years ago #

    Saurus: No, how would you suggest to do that? Just use another custom named jpg there?

  7. figaro
    Member
    Posted 5 years ago #

    Customizing the Kubrick header shouldn't be that difficult. You don't need to change any coding. If you will post a link to the header image you made and want to use (a link to just that image file) then I'll download and incorporate it into Kubrick for you.

    By the way, what version of WP are you using?

  8. nfin1te
    Member
    Posted 5 years ago #

    figaro: The image can be found here:
    http://www.dirtymoustache.net/designdirect/kubrickheader_custom.jpg

    Im using WP 2.7.

    Would be great if this works, appreciate your effort, thanks

  9. figaro
    Member
    Posted 5 years ago #

    See if this is what you want:

    http://heraldleader.org/blog4/

    If so, download the theme zip here.

    http://heraldleader.org/design_direct.zip

    Let me know when you have downloaded it and I'll delete it from my site.

  10. nfin1te
    Member
    Posted 5 years ago #

    figaro: Thanks, not entirely.
    The name and description still needs to get displayed, i just want to remove the grey background between the name/desc and my own background image.

  11. nfin1te
    Member
    Posted 5 years ago #

    lol, i did it:
    in the header-img.php file, i outcommented this:

    // If we don't have image processing support, redirect.
    if ( ! function_exists('imagecreatefromjpeg') )
    	die(header("Location: kubrickheader.jpg"));

    to this:

    // If we don't have image processing support, redirect.
    // if ( ! function_exists('imagecreatefromjpeg') )
    	die(header("Location: kubrickheader.jpg"));

    So i assumed, he'd not run the script at all if i cancel the beginning if question. Is this an acceptable way of doing this or is this just "noobish"? ;)

  12. figaro
    Member
    Posted 5 years ago #

    If you have what you want and it works, then use it. I just took those off since I thought you didn't want them.

  13. nfin1te
    Member
    Posted 5 years ago #

    Thanks for your efforts figaro!

  14. figaro
    Member
    Posted 5 years ago #

    You're welcome.

  15. jberghem
    Member
    Posted 5 years ago #

    @nfin1te - I know it takes out the whole header, that is what I meant for it to do because those lines are an embedded CSS stylesheet that will override the style.css. Trying to style around the embedded CSS will always take more time and frustration than getting rid of it and redoing it in the style.css. The Kubrick header is ideal if you only want to change the color of it. If you want to customize it further, I usually suggest to start with a theme that doesn't incorporate extra functions that are styled with embedded stylesheets

  16. gil
    Member
    Posted 5 years ago #

    nfin1te, thanks.

    I was staring at that line of code, I promise you, but wasn't sure what to do. Took a search of the forums, and there it was! Tried it - it worked.

    Carfilhiot

  17. djrockwell
    Member
    Posted 5 years ago #

    I'm having a similar issue...I created a new header for Kubrick, renamed it 'kubrickheader' and replaced it with the default image, but now it shows both images? When I renamed the image just 'header' and changed the reference in the stylesheet, it shows no header at all?

    I understand I need to change some code in one of the template files, just not sure what to change and where?

Topic Closed

This topic has been closed to new replies.

About this Topic