Support » Theme: Twenty Twelve » Header Image Help

  • Resolved teakline

    (@teakline)


    Hi, I’m trying to add an image above my header so my site looks like:

    Header Image
    Blog Title
    Blog Post

    and was following a thread but I didn’t realize I wasn’t allowed to ask questions (seriously, I’m sorry) and was told to start my own thread.

    I asked my webhost to create a folder called “decode child” but now when I got to the themes on my site, it says the theme is broken and the stylesheet is missing, so I can’t add the style.css file or folder.

Viewing 13 replies - 46 through 58 (of 58 total)
  • You’re missing a piece of code:

    Change:

    <?php if ( get_header_image() ) : ?>
    		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>

    to:

    <?php if ( get_header_image() ) : ?>
    		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    <?php endif; ?>

    how do I create the header.php?

    Use a plain text editor like Notepad. when you are finished, upload it to the wp-content/themes/twenty-twelve-child folder using FTP or whatever file management application your host provides.

    Thread Starter teakline

    (@teakline)

    OK thank you be right back!

    Thread Starter teakline

    (@teakline)

    Sorry, I accidentally downloaded a malware (because of course I did) and can’t figure out how to get to my FTP. I did it once and now I can’t remember how to get back.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Sorry, I accidentally downloaded a malware (because of course I did) and can’t figure out how to get to my FTP. I did it once and now I can’t remember how to get back.

    Does your hosting provide access to your web server’s file system? You may have another way to access that directory without using FTP.

    Thread Starter teakline

    (@teakline)

    I downloaded FileZilla (without the malware) and now I’m just trying to figure out how to get the php file to where I want

    Thread Starter teakline

    (@teakline)

    OK! I uploaded the header.php file.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Can you locate your wp-content/themes/ directory in FileZilla?

    Edit: That’s cool. 😉

    Thread Starter teakline

    (@teakline)

    AHHH IT WORKED!

    I just have one more question because the header isn’t centered now… is that something I can fix in the code?

    Thread Starter teakline

    (@teakline)

    Or should I just add a different header image that’s longer so it stretches across the whole top of the blog? Does that make sense?

    Thread Starter teakline

    (@teakline)

    It looks great on mobile, though!

    Esmi, you deserve a medal for helping me. And a drink. THANK YOU!

    Thread Starter teakline

    (@teakline)

    Marking this as resolved, thanks again.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Congrats! I know she’ll be glad to read that. 😉

Viewing 13 replies - 46 through 58 (of 58 total)
  • The topic ‘Header Image Help’ is closed to new replies.