• I have just installed the First theme on WordPress 4.0, but whatever I try, I the theme won’t display a header image.
    I there a way I can make this work?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Cheers, i tried to replicate your issue on 3 installs (3.9, 4.0 and 4.1 nightly) but uploading a header image in the theme customizier works just fine.

    Have you tried with activating a WordPress standard theme (like twentyeleven) and then see if there is the same problems? If so, you may have the wrong permissions in the upload directory.

    Thread Starter Snader86

    (@snader86)

    The TwentyeEleven theme is working just fine. I’ve managed to “solve” the problem, by changing the header image in the header.php instead of using the theme customizer.

    It’s not the best solution, but it works.

    polishbunny

    (@polishbunny)

    I really like the theme but I have the same problem. What do I need to do in header.php?

    (I’m clueless)

    Thank you

    Corine van den Berg

    (@corine-van-den-berg)

    I also really like this theme, but have the same problem. Isn’t this a bug in the theme? I know where to find header.php, but I don’t have a clue how tot get the header in. Can anybody help?

    A website without header is not really it, see https://www.onlyne.nl, but I would like tot keep this nice theme.

    Thank you!

    Thread Starter Snader86

    (@snader86)

    If you open the header.php the following code is used to display the header image:

    <?php if ( is_home() && get_header_image() ) : ?>
    		<div id="header-image" class="header-image">
    			<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="">
    		</div><!-- #header-image -->
    		<?php elseif ( is_page() && has_post_thumbnail() ) : ?>
    		<div id="header-image" class="header-image">
    			<?php the_post_thumbnail( 'first-page-thumbnail' ); ?>
    
    		</div><!-- #header-image -->
    		<?php endif; ?>

    If you remove this code, and replace it with the following you can use your own image. The only downside is that you can’t use the theme customizer to change the image.

    <div id="header-image" class="header-image">
    		<img src="https://www.yoursite.com/image.jpg" height="200"  width="1220">
    		</div>

    You can change the URL, height and width of the image accordingly.

    Corine van den Berg

    (@corine-van-den-berg)

    This really works. I’m so glad with your help. Now I can keep using this nice Theme. Snader86, thank you very much! Corine

    polishbunny

    (@polishbunny)

    Snader86 fantastic! It worked! Thank you sooooo much ??

    polishbunny

    (@polishbunny)

    Another Question. Is there a way to put the Navigation bar on the bottom of the Header?

    Thank you ??

    Corine van den Berg

    (@corine-van-den-berg)

    Oh yes, that would be much nicer!

    AlanQ

    (@alanq)

    I’m struggling with this one too.

    It seems to be that little of the header can be modified without editing header.php

    @polishbunny and @corine van den Berg —
    Putting the Navigation bar below the header is equally as easy as Snader86’s technique for hard coding the header image:

    Put

    <div id="header-image" class="header-image"><img src="..."></div>

    Just above the block that begins

    <?php if ( ! get_theme_mod( 'first_hide_navigation' ) ) : ?>
    	<div class="site-bar">
    		<nav id="site-navigation" class="main-navigation" role="navigation">

    and ends

    </nav><!-- #site-navigation -->
    	</div>
    		<?php endif; ?>

    It’s best to do these changes on header.php within a child theme:

    Follow the instructions here https://codex.www.ads-software.com/Child_Themes

    Then copy header.php from the directory of the ‘first’ theme into the new ‘first-child’ directory — this is the one you edit.

    This way, when First is updated, the update doesn’t destroy all your changes.

    If/when First is updated, check to see if this bug has been fixed.

    If not, you will want to take a copy of First’s header.php and re-apply your modifications within your child theme, just in case header.php has changed in the new version of First.

    I really like this theme too, but the header image is only appearing on the front page of my blog, and not on individual posts or pages. Is there a way to change that? Thanks!

    I actually just figured it out, but thanks! ??

    Try

    is_front_page()

    instead of

    is_home()

    if you use static front page.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Header image not. working’ is closed to new replies.