• 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 15 replies - 16 through 30 (of 58 total)
  • Thread Starter teakline

    (@teakline)

    I’m not sure what to do next. Do I create a style.css file?

    The child theme already contains a style.css file. You wouldn’t have been able to activate the child theme without it. 🙂

    This header image that you want to add, would it be different for every post?. Or the same throughout the site?

    Thread Starter teakline

    (@teakline)

    Oh ok haha.

    The same throughout the site! I just want it to be above the blog title, when I tried to put in the header just through the parent twenty twelve, the photo was below the title and looked like it was part of the first blog post and I don’t want that.

    Can we see your site for reference purposes?

    Thread Starter teakline

    (@teakline)

    I just refreshed my blog after activating the child plugin and the site looks weird no. The text is no longer formatted to stop at a certain width and the categories from the sidebar are gone…

    Thread Starter teakline

    (@teakline)

    Oh sorry just saw your above comment. It’s alwaysoverthinkingit.com

    Thread Starter teakline

    (@teakline)

    Sorry, ignore my previous comment about the site looking weird.

    Can you temporarily deactivate your caching plugin or flush your cache? Right now, we can’t see the child theme.

    Next, place a copy of the original 2012 header.php in your child theme. edit the child theme’s copy of the file and move:

    <?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; ?>

    from just above </header><!-- #masthead --> to immediately below <header id="masthead" class="site-header" role="banner">.

    Thread Starter teakline

    (@teakline)

    I copied the section from the original 2012 with the section that says header, the code looks (partially) like this:

    /* Header */
    .site-header {
    padding: 24px 0;
    padding: 1.714285714rem 0;
    }

    I don’t see any of the coding that you copied and pasted. Am I using the wrong original 2012 section?

    Thread Starter teakline

    (@teakline)

    Oh and I deactivated the cache plugin, so you should be able to see the site with the child theme.

    Thread Starter teakline

    (@teakline)

    I’m not sure where to get the header.php from.

    I’m not sure where to get the header.php from.

    From the parent 2012 theme. Just copy the whole file into your child theme.

    Thread Starter teakline

    (@teakline)

    OK just kidding I figured that part out! (I really should not be so proud of myself, but I’m terrified of coding).

    I’ve successfully moved the string of code to where you instructed.

    So, just to clarify, you now have a customised header.php file in your child theme and the child has been activated on your site, yes? If so,navigate to Appearance -> Header and now try adding a header image.

Viewing 15 replies - 16 through 30 (of 58 total)

The topic ‘Header Image Help’ is closed to new replies.