Support » Theme: Twenty Seventeen » Featured header in twenty seventeen?

  • Is it possible in twenty seventeen to move the featured image of a page into the header instead of sitting on top of the text? If I use a plugin I get a double header together with the featured image.
    Sometimes they call that a featured header.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,
    Follow these steps:
    1. Create a child theme and Activate it.
    2. Copy header.php into teh child theme.
    3. Remove this code in header.php (line no. 31). In other words, remove the call for header image.
    <?php get_template_part( 'template-parts/header/header', 'image' ); ?>

    4. Move this code from line no. 43-50 to line 31. In other words, move the call for featured image to where header image was being called.

    `<?php
    // If a regular post or page, and not the front page, show the featured image.
    if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
    echo ‘<div class=”single-featured-image-header”>’;
    the_post_thumbnail( ‘twentyseventeen-featured-image’ );
    echo ‘</div><!– .single-featured-image-header –>’;
    endif;
    ?>`

    5. Save

    Haz

    (@tvguy2000)

    I tried this and it “almost” works.

    The header image is removed from the page, and the featured image appears on the page properly. So both of those results are good.

    But the header image also disappears from the homepage, and I would like to keep the header image on the home page.

    Any help would be sincerely appreciated.

    I am looking for the same solution. Did you ever figure out how to get the header image to show up on your homepage?

    Haz

    (@tvguy2000)

    No, I have not been able to figure it out yet. And sadly, I have not gotten any responses from forum members. If you figure it out, please let me know.

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @tvguy2000, All of your topics have been marked resolved. If you have an outstanding issue it is important to leave the topic unresolved so that people can know that and then try to help you.

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m marking this resolved as the OP never got back to the volunteer who tried to help out 5 months ago.

    It’s not resolved, I didn’t postit, but it doesn’t work decent, so as Haz statde.

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @hansbeen, Try the solution posted in this thread: https://wordpress.org/support/topic/use-featured-image-as-header-on-posts-pages-with-title-overlay/

    If you’re having issues with that solution, could you write them down in your thread instead of that one?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Featured header in twenty seventeen?’ is closed to new replies.