How to make header link to home page?

  • Hi! I created a blog with a template but used as header only a picture. I need the picture to link to the home page. Please help! The code for the header is

    </head>

    <body <?php body_class(); ?>>

    <div class=”big-wrapper”>

    <div class=”header-cover section bg-dark-light no-padding”>

    <div class=”header section” style=”background-image: url(<?php if (get_header_image() != ”) : ?><?php header_image(); ?><?php else : ?><?php echo get_template_directory_uri() . ‘/images/header.jpg’; ?><?php endif; ?>);”>

    <div class=”header-inner section-inner”>

    <?php if ( get_theme_mod( ‘hemingway_logo’ ) ) : ?>

    <div class=’blog-logo’>

    ‘ title='<?php echo esc_attr( get_bloginfo( ‘title’ ) ); ?> — <?php echo esc_attr( get_bloginfo( ‘description’ ) ); ?>’ rel=’home’>
    <img src='<?php echo esc_url( get_theme_mod( ‘hemingway_logo’ ) ); ?>’ alt='<?php echo esc_attr( get_bloginfo( ‘title’ ) ); ?>’>

    </div> <!– /blog-logo –>

    <?php elseif ( get_bloginfo( ‘description’ ) || get_bloginfo( ‘title’ ) ) : ?>

    <div class=”blog-info”>

    <h1 class=”blog-title”>
    ” title=”<?php echo esc_attr( get_bloginfo( ‘title’ ) ); ?> — <?php echo esc_attr( get_bloginfo( ‘description’ ) ); ?>” rel=”home”><?php echo esc_attr( get_bloginfo( ‘title’ ) ); ?>
    </h1>

    <?php if ( get_bloginfo( ‘description’ ) ) { ?>

    <h3 class=”blog-description”><?php echo esc_attr( get_bloginfo( ‘description’ ) ); ?></h3>

    <?php } ?>

    </div> <!– /blog-info –>

    <?php endif; ?>

    </div> <!– /header-inner –>

    </div> <!– /header –>

    </div> <!– /bg-dark –>

    <div class=”navigation section no-padding bg-dark”>

    <div class=”navigation-inner section-inner”>

    <div class=”toggle-container hidden”>

    <div class=”nav-toggle toggle”>

    <div class=”bar”></div>
    <div class=”bar”></div>
    <div class=”bar”></div>

    <div class=”clear”></div>

    </div>

    <div class=”search-toggle toggle”>

    <div class=”metal”></div>
    <div class=”glass”></div>
    <div class=”handle”></div>

    </div>

    <div class=”clear”></div>

    </div> <!– /toggle-container –>

    <div class=”blog-search hidden”>

    <?php get_search_form(); ?>

    </div>

    <ul class=”blog-menu”>

    <?php if ( has_nav_menu( ‘primary’ ) ) {

    wp_nav_menu( array(

    ‘container’ => ”,
    ‘items_wrap’ => ‘%3$s’,
    ‘theme_location’ => ‘primary’,
    ‘walker’ => new hemingway_nav_walker

    ) ); } else {

    wp_list_pages( array(

    ‘container’ => ”,
    ‘title_li’ => ”

    ));

    } ?>

    <div class=”clear”></div>

    <ul class=”mobile-menu”>

    <?php if ( has_nav_menu( ‘primary’ ) ) {

    wp_nav_menu( array(

    ‘container’ => ”,
    ‘items_wrap’ => ‘%3$s’,
    ‘theme_location’ => ‘primary’,
    ‘walker’ => new hemingway_nav_walker

    ) ); } else {

    wp_list_pages( array(

    ‘container’ => ”,
    ‘title_li’ => ”

    ));

    } ?>

    </div> <!– /navigation-inner –>

    </div> <!– /navigation –>

    Thank you for your help!

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    There’s not a way to make this adjustment on WordPress.com some themes will provide links in their headers and others will not.

    If you’re adjusting a self-hosted site running the free WordPress software, I suggest asking for help editing your child theme in the WordPress.org forums for the Hemingway theme:

    https://wordpress.org/support/theme/hemingway

    -Alex G.

  • Thanks! i will do that

  • The topic ‘How to make header link to home page?’ is closed to new replies.